ci(release): add tag-triggered workflow to build and upload package t… #1
Workflow file for this run
This file contains hidden or 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: Tag Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| env: | |
| YARN_ENABLE_SCRIPTS: false | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20.x' | |
| - name: Build packages | |
| run: | | |
| yarn install --immutable | |
| yarn build | |
| - name: Pack workspace tarballs | |
| run: | | |
| mkdir -p artifacts | |
| for dir in packages/*/build; do | |
| if [ -f "$dir/package.json" ]; then | |
| npm pack "$dir" --pack-destination artifacts | |
| fi | |
| done | |
| ls -la artifacts | |
| - name: Upload assets to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/*.tgz |