Release #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
versionType: | |
description: version type increment (major | minor | patch) | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
name: Generate app token | |
with: | |
app-id: ${{ vars.GRIDSUITE_ACTIONS_APPID }} | |
private-key: ${{ secrets.GRIDSUITE_ACTIONS_SECRET }} | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.app-token.outputs.token }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Add release commit and publish | |
run: | | |
npm version ${{ github.event.inputs.versionType }} | |
git push origin main | |
git push origin $(git tag --points-at HEAD) | |
npm install | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |