diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml new file mode 100644 index 000000000000..a24c9c388eaa --- /dev/null +++ b/.github/workflows/tag-release.yml @@ -0,0 +1,45 @@ +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