Skip to content

Commit 2bb7470

Browse files
authored
Merge pull request #345 from microsoftgraph/ci/switch-tag-trigger
ci: switches to a tag trigger to align with other languages
2 parents 43ff06c + df3ad81 commit 2bb7470

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/build_test_validate.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
workflow_dispatch:
55
push:
66
branches: [ main ]
7+
tags: [ 'v*' ]
78
pull_request:
89

910
jobs:
1011
build:
1112
runs-on: ubuntu-latest
1213
strategy:
1314
matrix:
14-
node-version: [18.x, 20.x]
15+
node-version: [18.x, 20.x, 22.x]
1516
steps:
1617
- uses: actions/checkout@v4
1718
- name: Use Node.js ${{ matrix.node-version }}
@@ -37,7 +38,7 @@ jobs:
3738
run: exit 1
3839

3940
publish-npm:
40-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.actor == 'release-please[bot]'}}
41+
if: startsWith(github.ref, 'refs/tags/')
4142
needs: build
4243
environment:
4344
name: production_feed
@@ -46,14 +47,8 @@ jobs:
4647
- uses: actions/checkout@v4
4748
- uses: actions/setup-node@v4
4849
with:
49-
node-version: 20
50+
node-version: 22
5051
registry-url: https://registry.npmjs.org/
51-
- run: |
52-
git config --global user.name '${GITHUB_ACTOR}'
53-
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
GITHUB_ACTOR: ${{ secrets.GIT_USERNAME }}
5752
- run: npm ci
5853
- run: npm run build
5954
- run: npm publish --access public

0 commit comments

Comments
 (0)