v5.0.0-alpha.5 #29
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: Release on tag | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| build-native-arm: | |
| runs-on: codspeedhq-arm64-ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: pnpm/action-setup@v2 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| cache: pnpm | |
| node-version-file: .nvmrc | |
| - run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Build native code on ARM | |
| run: pnpm moon core:build-native-addon | |
| - name: Upload ARM prebuilds | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: arm-prebuilds | |
| path: packages/core/prebuilds | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: build-native-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - uses: pnpm/action-setup@v2 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| cache: pnpm | |
| node-version-file: .nvmrc | |
| registry-url: "https://registry.npmjs.org" | |
| - run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Build the libraries | |
| run: pnpm moon run :build | |
| - name: Download ARM prebuilds | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: arm-prebuilds | |
| path: packages/core/prebuilds | |
| - name: Publish the libraries | |
| run: | | |
| if [[ "${{ github.ref }}" == *"-alpha"* ]]; then | |
| pnpm publish -r --access=public --no-git-checks --tag=alpha | |
| else | |
| pnpm publish -r --access=public --no-git-checks | |
| fi | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Create a draft release | |
| run: | | |
| NEW_VERSION=$(pnpm lerna list --json | jq -r '.[] | select(.name == "@codspeed/core") | .version') | |
| gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |