Use artifacts for building binaries in CI
All checks were successful
Test / build (push) Successful in 22s

This commit is contained in:
Ethan Lane 2025-01-07 17:48:35 +00:00
parent d94eb1ea7e
commit e638724811
2 changed files with 22 additions and 9 deletions

View file

@ -21,18 +21,29 @@ jobs:
- run: yarn test - run: yarn test
- run: yarn lint - run: yarn lint
publish: package:
needs: build needs: build
runs-on: node runs-on: node
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: yarn package
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
path: bin/
if-no-files-found: error
publish:
needs: package
runs-on: node
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20.x
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn package
- run: cp -r ./bin ${{ secrets.PROD_REPO_PATH }}
- uses: https://github.com/JS-DevTools/npm-publish@v3 - uses: https://github.com/JS-DevTools/npm-publish@v3
with: with:
token: ${{ secrets.NPM_TOKEN }} token: ${{ secrets.NPM_TOKEN }}

View file

@ -23,7 +23,7 @@ jobs:
- run: yarn test - run: yarn test
- run: yarn lint - run: yarn lint
rsync: package:
needs: build needs: build
runs-on: node runs-on: node
steps: steps:
@ -31,7 +31,9 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20.x node-version: 20.x
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn package - run: yarn package
- run: cp -r ./bin ${{ secrets.STAGE_REPO_PATH }} - name: Upload Binary
uses: actions/upload-artifact@v4
with:
path: bin/
if-no-files-found: error