Update deps #31
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: Build and Publish ra-apisix-oidc | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| registry-url: 'https://registry.npmjs.org/' | |
| - name: Check if version changed | |
| id: version_check | |
| run: | | |
| CUR_VER=$(jq -r .version packages/ra-apisix-oidc/package.json) | |
| PREV_VER=$(git show HEAD^:packages/ra-apisix-oidc/package.json | jq -r .version) | |
| echo "Current version: $CUR_VER" | |
| echo "Previous version: $PREV_VER" | |
| if [ "$CUR_VER" != "$PREV_VER" ]; then | |
| echo "::set-output name=changed::true" | |
| else | |
| echo "::set-output name=changed::false" | |
| fi | |
| shell: bash | |
| - name: Build | |
| run: make build-ra-apisix-oidc | |
| env: | |
| ARTE_NPMJS_TOKEN: ${{ secrets.ARTE_NPMJS_TOKEN }} | |
| - name: Publish to npm | |
| if: steps.version_check.outputs.changed == 'true' | |
| run: make publish | |
| env: | |
| ARTE_NPMJS_TOKEN: ${{ secrets.ARTE_NPMJS_TOKEN }} |