-
Notifications
You must be signed in to change notification settings - Fork 11
79 lines (70 loc) · 2.53 KB
/
release.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: "Release"
on: workflow_dispatch
jobs:
tests:
uses: ./.github/workflows/tests.yaml
rcc:
uses: ./.github/workflows/rcc.yaml
system_tests:
needs: rcc
uses: ./.github/workflows/system_tests.yaml
build_robotmk:
uses: ./.github/workflows/robotmk_build.yaml
release:
runs-on: ubuntu-latest
needs: [tests, system_tests, rcc, build_robotmk]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: rcc
path: artifact/rcc/
- uses: actions/download-artifact@v4
with:
name: rmk_windows64
path: artifact/rmk_windows64/
- uses: actions/download-artifact@v4
with:
name: rmk_linux64
path: artifact/rmk_linux64/
- run: zip -r executables.zip artifact
- name: "Prepare RCC binaries for release"
run: |
cp artifact/rcc/linux64/rcc artifact/rcc/rcc_linux64
cp artifact/rcc/linux64/rccremote artifact/rcc/rccremote_linux64
cp artifact/rcc/windows64/rcc artifact/rcc/rcc_windows64.exe
cp artifact/rcc/lwindows64/rccremote artifact/rcc/rccremote_windows64.exe
- name: "Compute release tag"
id: compute-tag
run: |
# file permissions are not retained during upload:
# https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
chmod +x artifact/rmk_linux64/robotmk_scheduler
version="$(./artifact/rmk_linux64/robotmk_scheduler --version | cut --delimiter " " --fields 2)"
echo "TAG=v${version}" >> "${GITHUB_OUTPUT}"
- name: "Push release tag"
# This is publicly visible and needs to be manually fixed if any
# consecutive step fails.
run: |
git tag ${{ steps.compute-tag.outputs.TAG }} # Fails, if tag exists.
git push origin ${{ steps.compute-tag.outputs.TAG }}
- uses: ncipollo/release-action@v1
with:
allowUpdates: false
artifacts: >
executables.zip,
assets/robotmk_core-1.0.0.mkp,
artifact/rcc/rcc_linux64,
artifact/rcc/rccremote_linux64,
artifact/rcc/rcc_windows64.exe,
artifact/rcc/rccremote_windows64.exe
replacesArtifacts: true
removeArtifacts: true
prerelease: true
draft: true
body: ""
artifactErrorsFailBuild: true
updateOnlyUnreleased: true
makeLatest: false
tag: ${{ steps.compute-tag.outputs.TAG }}