mirror of
https://github.com/CompeyDev/setup-rokit.git
synced 2024-12-12 04:30:37 +00:00
update
This commit is contained in:
parent
88c4233299
commit
b999011306
3 changed files with 98 additions and 38 deletions
41
.github/actions/env/action.yml
vendored
41
.github/actions/env/action.yml
vendored
|
@ -1,15 +1,50 @@
|
|||
name: Build Test Environment
|
||||
description: Build test environment for setup-aftman
|
||||
name: Test
|
||||
description: Test
|
||||
author: ok-nick
|
||||
|
||||
# same input as `setup-aftman`
|
||||
inputs:
|
||||
version:
|
||||
required: false
|
||||
no-trust-check:
|
||||
default: 'false'
|
||||
required: false
|
||||
trusts:
|
||||
required: false
|
||||
path:
|
||||
default: '.'
|
||||
required: false
|
||||
token:
|
||||
default: '${{ github.token }}'
|
||||
required: false
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/env
|
||||
|
||||
- shell: bash
|
||||
run: |
|
||||
cat > ./aftman.toml << EOF
|
||||
cat > ${{ inputs.path}}/aftman.toml << EOF
|
||||
[tools]
|
||||
selene = "Kampfkarren/selene@0.19.1"
|
||||
stylua = "JohnnyMorganz/stylua@0.14.0"
|
||||
rojo = "rojo-rbx/rojo@7.2.1"
|
||||
EOF
|
||||
|
||||
- name: Run setup-aftman
|
||||
uses: ./
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
no-trust-check: ${{ inputs.no-trust-check }}
|
||||
trusts: ${{ inputs.trusts }}
|
||||
path: ${{ inputs.path }}
|
||||
token: ${{ inputs.token }}
|
||||
|
||||
|
|
81
.github/workflows/CI.yml
vendored
81
.github/workflows/CI.yml
vendored
|
@ -2,45 +2,72 @@ name: CI
|
|||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test_linux:
|
||||
test_linux_no_trust:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/env
|
||||
|
||||
- name: Run setup-aftman
|
||||
uses: ./
|
||||
- uses: ./.github/actions/env
|
||||
with:
|
||||
no-trust-check: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
test_mac:
|
||||
test_mac_no_trust:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/env
|
||||
|
||||
- name: Run setup-aftman
|
||||
uses: ./
|
||||
- uses: ./.github/actions/env
|
||||
with:
|
||||
no-trust-check: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
test_windows:
|
||||
test_windows_no_trust:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/env
|
||||
|
||||
- name: Run setup-aftman
|
||||
uses: ./
|
||||
- uses: ./.github/actions/env
|
||||
with:
|
||||
no-trust-check: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
test_linux_with_trust:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/env
|
||||
with:
|
||||
trusts: "Kampfkarren/selene JohnnyMorganz/stylua rojo-rbx/rojo"
|
||||
|
||||
test_mac_with_trust:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/env
|
||||
with:
|
||||
trusts: "Kampfkarren/selene JohnnyMorganz/stylua rojo-rbx/rojo"
|
||||
|
||||
test_windows_with_trust:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/env
|
||||
with:
|
||||
trusts: "Kampfkarren/selene JohnnyMorganz/stylua rojo-rbx/rojo"
|
||||
|
||||
test_linux_version_and_path:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/env
|
||||
run: "mkdir project"
|
||||
with:
|
||||
version: 0.2.2
|
||||
path: "./project"
|
||||
|
||||
test_mac_version_and_path:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/env
|
||||
run: "mkdir project"
|
||||
with:
|
||||
version: 0.2.2
|
||||
path: "./project"
|
||||
|
||||
|
||||
test_windows_version_and_path:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/env
|
||||
run: "mkdir project"
|
||||
with:
|
||||
version: 0.2.2
|
||||
path: "./project"
|
||||
|
|
14
action.yml
14
action.yml
|
@ -15,39 +15,39 @@ inputs:
|
|||
required: false
|
||||
path:
|
||||
description: 'Path to the `aftman.toml` directory'
|
||||
default: './'
|
||||
default: '.'
|
||||
required: false
|
||||
token:
|
||||
description: 'Github token from `github.token`'
|
||||
default: '${{ github.token }}'
|
||||
required: true
|
||||
required: false
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Download aftman
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *linux-x86_64.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
|
||||
- name: Download aftman
|
||||
if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *macos-x86_64.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
|
||||
- name: Download aftman
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: gh release download ${{ inputs.version }} --repo LPGhatguy/aftman --pattern *windows-x86_64.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
|
||||
- name: Install aftman
|
||||
shell: bash
|
||||
run: |
|
||||
unzip aftman*.zip
|
||||
./aftman self-install
|
||||
|
@ -55,14 +55,12 @@ runs:
|
|||
|
||||
- name: Setup trusts
|
||||
if: ${{ inputs.no-trust-check == false }}
|
||||
shell: bash
|
||||
run: |
|
||||
for name in ${{ inputs.trusts }}; do
|
||||
aftman trust $name
|
||||
done
|
||||
|
||||
- name: Install tools
|
||||
shell: bash
|
||||
run: |
|
||||
cd ${{ inputs.path }}
|
||||
if [ ${{ inputs.no-trust-check }} == true ]; then
|
||||
|
|
Loading…
Reference in a new issue