From ed9e8c67de4ffe40bf4f00545a4de7fa10bd42ab Mon Sep 17 00:00:00 2001 From: Cam <21029087+csqrl@users.noreply.github.com> Date: Thu, 1 Dec 2022 23:27:51 +0000 Subject: [PATCH] Create publish.yml (#2) --- .github/workflows/publish.yml | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..976e754 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,58 @@ +name: Publish Package + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + publish-package: + if: ${{ github.events.release.prerelease == false }} + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + ref: ${{ github.event.release.tag_name }} + + - name: Setup Aftman + uses: ok-nick/setup-aftman@v0.3.0 + + - name: Setup Node LTS + uses: actions/setup-node@v2 + with: + node-version: lts/* + + - name: Report Tool Versions + run: | + aftman -V + aftman list + node -v + npm -v + + - name: Install Dependencies + run: | + npm install + wally install + + - name: Remove Tests + run: | + find . -name "*.spec.lua" -delete + + # - name: Publish to Roblox + # run: rojo upload default.project.json --asset_id "${{ secrets.ASSET_ID }}" --cookie "${{ secrets.ROBLOSECURITY }}" + + - name: Publish to Wally + env: + WALLY_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p ~/.wally + printf "[tokens]\n\"https://api.wally.run/\" = \"%s\"" "$WALLY_TOKEN" >> ~/.wally/auth.toml + wally publish + + - name: Publish to NPM + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }}