Skip to content

Commit

Permalink
Merge pull request #345 from microsoftgraph/ci/switch-tag-trigger
Browse files Browse the repository at this point in the history
ci: switches to a tag trigger to align with other languages
  • Loading branch information
baywet authored Feb 4, 2025
2 parents 43ff06c + df3ad81 commit 2bb7470
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build_test_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ on:
workflow_dispatch:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -37,7 +38,7 @@ jobs:
run: exit 1

publish-npm:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor == 'release-please[bot]'}}
if: startsWith(github.ref, 'refs/tags/')
needs: build
environment:
name: production_feed
Expand All @@ -46,14 +47,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: https://registry.npmjs.org/
- run: |
git config --global user.name '${GITHUB_ACTOR}'
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GIT_USERNAME }}
- run: npm ci
- run: npm run build
- run: npm publish --access public
Expand Down

0 comments on commit 2bb7470

Please sign in to comment.