chore: version bump of express #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: | |
| push: | |
| tags: | |
| - "core-v*" | |
| - "express-v*" | |
| jobs: | |
| publish: | |
| name: Publish Package | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Determine package and version | |
| id: meta | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| if [[ "$TAG" == core-v* ]]; then | |
| PACKAGE="core" | |
| VERSION="${TAG#core-v}" | |
| elif [[ "$TAG" == express-v* ]]; then | |
| PACKAGE="express" | |
| VERSION="${TAG#express-v}" | |
| else | |
| echo "Invalid tag format" | |
| exit 1 | |
| fi | |
| echo "package=$PACKAGE" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Publishing $PACKAGE version $VERSION" | |
| - name: Validate package.json version matches tag | |
| working-directory: packages/${{ steps.meta.outputs.package }} | |
| run: | | |
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
| if [ "$PACKAGE_VERSION" != "${{ steps.meta.outputs.version }}" ]; then | |
| echo "Version mismatch!" | |
| echo "Tag version: ${{ steps.meta.outputs.version }}" | |
| echo "package.json version: $PACKAGE_VERSION" | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| working-directory: packages/${{ steps.meta.outputs.package }} | |
| run: npm ci | |
| - name: Build | |
| working-directory: packages/${{ steps.meta.outputs.package }} | |
| run: npm run build | |
| - name: Publish to npm | |
| working-directory: packages/${{ steps.meta.outputs.package }} | |
| run: npm publish --access public |