Skip to content

Release

Release #66

Workflow file for this run

---
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 all_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.exe artifact/rcc/rcc_windows64.exe
cp artifact/rcc/windows64/rccremote.exe artifact/rcc/rccremote_windows64.exe
cp artifact/rcc/macos64/rcc artifact/rcc/rcc_macos64
cp artifact/rcc/macos64/rccremote artifact/rcc/rccremote_macos64
- 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: >
all_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
artifact/rcc/rcc_macos64,
artifact/rcc/rccremote_macos64,
replacesArtifacts: true
removeArtifacts: true
prerelease: true
draft: true
body: ""
artifactErrorsFailBuild: true
updateOnlyUnreleased: true
makeLatest: false
tag: ${{ steps.compute-tag.outputs.TAG }}