Skip to content

Commit 7a2762c

Browse files
ci: simplify github actions and fix release please (onomondo#75)
1 parent c3f031a commit 7a2762c

File tree

3 files changed

+62
-41
lines changed

3 files changed

+62
-41
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release Artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
description: 'Release tag'
8+
required: true
9+
default: v5.0.0
10+
run_id:
11+
description: 'Run ID'
12+
required: true
13+
default: '13908029974'
14+
15+
jobs:
16+
release-artifacts:
17+
runs-on: ubuntu-24.04
18+
timeout-minutes: 30
19+
20+
strategy:
21+
matrix:
22+
board: [nrf9160dk/nrf9160/ns, nrf9161dk/nrf9161/ns, nrf9151dk/nrf9151/ns, thingy91/nrf9160/ns]
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Archive name generator
31+
id: artifact_name
32+
run: echo "artifact_name=$(echo ${{ matrix.board }} | tr "/" "_")" >> $GITHUB_OUTPUT
33+
34+
- name: Download Build Artifacts
35+
uses: actions/download-artifact@v4
36+
with:
37+
name: ${{ steps.artifact_name.outputs.artifact_name }}
38+
run-id: ${{ github.event.inputs.run_id }}
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Upload Release Artifact
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: |
45+
zip -v ${{ steps.artifact_name.outputs.artifact_name }}.zip merged.hex
46+
gh release upload ${{ github.event.inputs.release_tag }} ${{ steps.artifact_name.outputs.artifact_name }}.zip

.github/workflows/lint-commits.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
---
2-
name: Lint commit messages
3-
on:
4-
pull_request:
1+
name: Lint Commit Messages
2+
3+
on: pull_request
54

65
jobs:
76
commitlint:
8-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
8+
99
steps:
10-
- uses: actions/checkout@v3
11-
name: Checkout source code
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
1214

13-
- uses: wagoid/commitlint-github-action@v5
14-
name: Lint commit messages
15+
- name: Linting commit messages
16+
uses: wagoid/commitlint-github-action@v5
1517

.github/workflows/release-please.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run release-please
1+
name: Release Please
22

33
on:
44
push:
@@ -11,39 +11,12 @@ permissions:
1111

1212
jobs:
1313
create-release:
14-
runs-on: ubuntu-latest
15-
timeout-minutes: 60
14+
runs-on: ubuntu-24.04
15+
timeout-minutes: 30
16+
1617
steps:
1718
- uses: googleapis/release-please-action@v4
1819
id: release
1920
with:
2021
release-type: simple
21-
package-name: ${{ github.event.repository.name }}
22-
outputs:
23-
tag: ${{ steps.release.outputs.tag_name }}
24-
release_created: ${{ steps.release.outputs.release_created }}
25-
26-
# Add build artifacts to the new GitHub release
27-
release-artifacts:
28-
needs: [build-in-docker-container, create-release]
29-
if: ${{ needs.create-release.outputs.release_created }}
30-
runs-on: ubuntu-latest
31-
timeout-minutes: 60
32-
33-
strategy:
34-
matrix:
35-
board: [nrf9160dk/nrf9160/ns, nrf9161dk/nrf9161/ns, nrf9151dk/nrf9151/ns]
36-
37-
steps:
38-
- name: Archive name generator
39-
id: artifact_name
40-
run: echo "artifact_name=$(echo ${{ matrix.board }} | tr "/" "_")" >> $GITHUB_OUTPUT
41-
42-
- name: Download Build Artifacts
43-
uses: actions/download-artifact@v4
44-
with:
45-
name: ${{ steps.artifact_name.outputs.artifact_name }}
46-
- name: Upload Release Artifact
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
run: gh release upload ${{ needs.create-release.outputs.tag }} ${{ steps.artifact_name.outputs.artifact_name }}.zip
22+
target-branch: master

0 commit comments

Comments
 (0)