random-bunny/.forgejo/workflows/publish.yml

51 lines
1,020 B
YAML
Raw Normal View History

name: Publish to NPM
on:
push:
tags:
- '*'
jobs:
build:
runs-on: node
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn test
- run: yarn lint
Update build pipeline to upload artifacts for the binary (#256) # 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: https://git.vylpes.xyz/RabbitLabs/random-bunny/pulls/256 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-01-14 18:31:43 +00:00
package:
needs: build
runs-on: node
Update build pipeline to upload artifacts for the binary (#256) # 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: https://git.vylpes.xyz/RabbitLabs/random-bunny/pulls/256 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-01-14 18:31:43 +00:00
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
2025-01-14 18:33:25 +00:00
- run: yarn install --frozen-lockfile
- run: yarn build
Update build pipeline to upload artifacts for the binary (#256) # 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: https://git.vylpes.xyz/RabbitLabs/random-bunny/pulls/256 Reviewed-by: VylpesTester <tester@vylpes.com> Co-authored-by: Ethan Lane <ethan@vylpes.com> Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-01-14 18:31:43 +00:00
- 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:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: https://github.com/JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}