chore(deps): update dependency oxfmt to ^0.66.0 (#267) #240
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-please | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "Release tag to publish (for example, vue3-gettext-v4.3.3)" | |
| required: true | |
| type: string | |
| dist_tag: | |
| description: "npm dist-tag; infer uses next for prereleases and latest otherwise" | |
| required: true | |
| default: "infer" | |
| type: choice | |
| options: | |
| - infer | |
| - latest | |
| - next | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| concurrency: | |
| group: release-please | |
| cancel-in-progress: false | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Release Please | |
| if: github.event_name == 'push' | |
| id: rp | |
| uses: googleapis/release-please-action@v5 | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| # npm trusts this workflow filename, so automatic releases and manual | |
| # recovery publishes must both run here. | |
| - name: Checkout | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ inputs.ref || steps.rp.outputs.tag_name }} | |
| - name: Setup Node | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| registry-url: "https://registry.npmjs.org" | |
| package-manager-cache: false | |
| - name: Install system deps | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gettext | |
| - name: Install deps | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| run: npm ci | |
| - name: Test | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| run: npm test | |
| - name: Build | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| run: npm run build | |
| - name: Publish | |
| if: github.event_name == 'workflow_dispatch' || steps.rp.outputs.release_created == 'true' | |
| run: | | |
| set -euo pipefail | |
| VERSION="$(node -p "require('./package.json').version")" | |
| RELEASE_TAG="${{ inputs.ref || steps.rp.outputs.tag_name }}" | |
| DIST_TAG="${{ inputs.dist_tag }}" | |
| if [[ "$RELEASE_TAG" =~ ^vue3-gettext-v(.+)$ ]]; then | |
| TAG_VERSION="${BASH_REMATCH[1]}" | |
| else | |
| echo "Ref must be a vue3-gettext release tag, received: $RELEASE_TAG" >&2 | |
| exit 1 | |
| fi | |
| if [[ "$VERSION" != "$TAG_VERSION" ]]; then | |
| echo "package.json version $VERSION does not match release tag $RELEASE_TAG" >&2 | |
| exit 1 | |
| fi | |
| if [[ -z "$DIST_TAG" || "$DIST_TAG" == "infer" ]]; then | |
| if [[ "$VERSION" == *-* ]]; then | |
| DIST_TAG="next" | |
| else | |
| DIST_TAG="latest" | |
| fi | |
| fi | |
| echo "Publishing version $VERSION to dist-tag: $DIST_TAG with npm trusted publishing" | |
| npm publish --tag "$DIST_TAG" |