-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.62 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Test this action
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-24.04
steps:
- name: Test running on ${{github.repository}}
run: echo Commit ${{github.sha}} seems to be working
- name: Test running on ${{github.repository}}
run: echo Commit ${{github.sha}} from a merge key seems to be working
- name: Test running on ${{github.repository}}
run: echo Commit ${{github.sha}} from an anchor seems to be working
release:
concurrency:
group: release-${{ github.event.number || github.ref }}
permissions:
contents: write
packages: write
needs:
- test
runs-on: ubuntu-24.04
if: >-
!github.event.repository.fork && (
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name == github.repository
)
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node
uses: actions/[email protected]
with:
node-version-file: package.json
- name: Install dependencies
run: npm install
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: npx semantic-release
success:
runs-on: ubuntu-24.04
needs:
- test
- release
if: >-
always() && (
contains(join(needs.*.result, ','), 'failure')
|| !contains(join(needs.*.result, ','), 'cancelled')
)
steps:
- name: Verify that there were no failures
run: ${{ !contains(join(needs.*.result, ','), 'failure') }}