From 0524c733f67522e929b1c41801612594e517ebf0 Mon Sep 17 00:00:00 2001 From: Solomon Jacobs Date: Mon, 13 Nov 2023 13:37:37 +0100 Subject: [PATCH 1/2] Test release --- .github/workflows/release.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a8ccd7e6..3cc4e546 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,10 +1,7 @@ --- -name: "Upload all artifacts" +name: "Release" -on: - push: - tags: - "**" +on: workflow_dispatch jobs: tests: @@ -15,8 +12,14 @@ jobs: uses: ./.github/workflows/robotmk_build.yaml release: runs-on: ubuntu-latest - needs: [build_rcc, build_robotmk] + needs: [build_rcc, build_robotmk, tests] steps: - uses: actions/download-artifact@v3 - run: zip -r executables.zip artifact + + - name: Push release tag + run: | + git checkout main + git tag v2.0.0-alpha + git push --tags From 5f8cea2cfc505c448392339f42771dc9f7e7277a Mon Sep 17 00:00:00 2001 From: Solomon Jacobs Date: Mon, 13 Nov 2023 13:59:28 +0100 Subject: [PATCH 2/2] Update release action --- .github/workflows/release.yaml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3cc4e546..2921010c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,8 +1,13 @@ ---- name: "Release" - -on: workflow_dispatch - +on: + workflow_dispatch: + inputs: + tag: + description: > + Tag, which is set by the this GitHub workflow. + Should follow SemVer and is not allowed to exist already. + required: true + type: string jobs: tests: uses: ./.github/workflows/tests.yaml @@ -12,14 +17,25 @@ jobs: uses: ./.github/workflows/robotmk_build.yaml release: runs-on: ubuntu-latest - needs: [build_rcc, build_robotmk, tests] + needs: [tests, build_rcc, build_robotmk] steps: + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - - run: zip -r executables.zip artifact - - name: Push release tag run: | git checkout main - git tag v2.0.0-alpha + git tag ${{ inputs.tag }} git push --tags + - uses: ncipollo/release-action@v1.13.0 + with: + allowUpdates: false + artifacts: "executables.zip" + replacesArtifacts: true + removeArtifacts: true + prerelease: true + draft: true + artifactErrorsFailBuild: true + updateOnlyUnreleased: true + makeLatest: false + tag: ${{ inputs.tag }}