Skip to content

Commit 126f368

Browse files
authored
Separate workflows (lucacome#61)
1 parent 8bbfdcf commit 126f368

File tree

3 files changed

+53
-26
lines changed

3 files changed

+53
-26
lines changed

.github/workflows/lint.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'lint'
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: |
16+
npm ci
17+
- run: |
18+
npm run format-check
19+
- run: |
20+
npm run lint

.github/workflows/test-workflow.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'test workflow'
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
9+
test: # make sure the action works on a clean machine without building
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: ./
14+
id: draft-release
15+
with:
16+
notes-header: |
17+
## Welcome to the {{version}} release of Draft Release
18+
This is some text to welcome you to the release {{version-number}}.
19+
notes-footer: |
20+
## Upgrade
21+
- For Docker, use the {{version}} image from Docker Hub.
22+
- For Binaries use the {{version-number}} release from GitHub.
23+
24+
- run: |
25+
echo "Version: ${{ steps.draft-release.outputs.version }}"
26+
echo "Release Notes: ${{ steps.draft-release.outputs.release-notes }}"
27+
echo "Release URL: ${{ steps.draft-release.outputs.release-url }}"
28+
echo "Release ID: ${{ steps.draft-release.outputs.release-id }}"

.github/workflows/test.yml

+5-26
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,16 @@
1-
name: 'build-test'
2-
on: # rebuild any PRs and main branch changes
1+
name: 'run tests'
2+
on:
33
pull_request:
44
push:
55
branches:
66
- main
7-
- 'releases/*'
87

98
jobs:
10-
build: # make sure build/ci work properly
9+
build:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v3
1413
- run: |
15-
npm install
14+
npm ci
1615
- run: |
17-
npm run all
18-
test: # make sure the action works on a clean machine without building
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v3
22-
- uses: ./
23-
id: draft-release
24-
with:
25-
notes-header: |
26-
## Welcome to the {{version}} release of Draft Release
27-
This is some text to welcome you to the release {{version-number}}.
28-
notes-footer: |
29-
## Upgrade
30-
- For Docker, use the {{version}} image from Docker Hub.
31-
- For Binaries use the {{version-number}} release from GitHub.
32-
33-
- run: |
34-
echo "Version: ${{ steps.draft-release.outputs.version }}"
35-
echo "Release Notes: ${{ steps.draft-release.outputs.release-notes }}"
36-
echo "Release URL: ${{ steps.draft-release.outputs.release-url }}"
37-
echo "Release ID: ${{ steps.draft-release.outputs.release-id }}"
16+
npm run test

0 commit comments

Comments
 (0)