-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.49 KB
/
default.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
58
59
60
61
62
63
64
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
test-default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: run
uses: ./
- run: test -n "${{ steps.run.outputs.node-build-version }}"
- run: test "${{ steps.run.outputs.node-version }}" = "$(< .node-version)"
test-with-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: run
uses: ./
with:
node-version-path: .nvmrc
- run: test -n "${{ steps.run.outputs.node-build-version }}"
- run: test "${{ steps.run.outputs.node-version }}" = "$(< .nvmrc)"
test-with-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: run
continue-on-error: true
uses: ./
with:
node-version: 999.999.999
- run: test -n "${{ steps.run.outputs.node-build-version }}"
- run: test "${{ steps.run.outputs.node-version }}" = "999.999.999"
- run: test "${{ steps.run.outcome }}" = "failure"
release:
needs:
- test-default
- test-with-path
- test-with-version
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Actions-R-Us/actions-tagger@v2
with:
publish_latest_tag: true