Release compiled package archives #7
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 compiled package archives | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
type: string | |
description: Version tag (without leading 'v') | |
jobs: | |
build-and-release: | |
name: Release Sample Apps | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Nodejs v16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Bump scripts package.json | |
run: ( cd scripts && npm version --no-git-tag-version ${{ inputs.version }} ) | |
- name: Install dependencies | |
run: ( cd scripts && npm install && run-script.js -w packages -e "npm install" ) | |
- name: Bump package versions | |
run: ./scripts/run-script.js -w packages -e "npm version ${{ inputs.version }}" | |
- name: Add and commit | |
run: git add . && git commit -m "Release version ${{ inputs.version }}" | |
- name: Build reference apps | |
run: ( cd scripts && npm run build ) | |
- name: Pack reference apps | |
run: ( cd scripts && npm run pack ) | |
- name: Create a release and upload artifacts | |
run: > | |
gh release create v${{ inputs.version }} --generate-notes | |
dist/*.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.SCRAMJET_BOT_TOKEN }} |