Update build pipeline to upload artifacts for the binary (#256)
Some checks failed
Stage / build (push) Successful in 20s
Stage / package (push) Failing after 8s

# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Update the staging workflow to also test `release/*` branches
- Move testing `hotfix/*` branches to the staging pipeline
- Update the staging workflow to upload the built binaries to artifacts
- Split the deploy workflow to package and upload the binaries to a separate stage to uploading to NPM

#247, #248

## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

- As this is a workflow change it will be tested once merged

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: #256
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
Ethan Lane 2025-01-14 18:31:43 +00:00 committed by Vylpes
parent 3b2da358b3
commit 448a2f8f11
3 changed files with 24 additions and 10 deletions

View file

@ -21,7 +21,7 @@ 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: steps:
@ -29,10 +29,21 @@ 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.PROD_REPO_PATH }} - name: Upload Binary
uses: actions/upload-artifact@v4
with:
path: bin/
if-no-files-found: error
publish:
needs: package
runs-on: node
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- 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

@ -4,6 +4,8 @@ on:
push: push:
branches: branches:
- develop - develop
- release/*
- hotfix/*
jobs: jobs:
build: build:
@ -21,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:
@ -29,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

View file

@ -4,7 +4,6 @@ on:
push: push:
branches: branches:
- feature/* - feature/*
- hotfix/*
- renovate/* - renovate/*
- dependabot/* - dependabot/*