diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b9eccb1..394ab354 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,7 +41,7 @@ jobs: run: ./scripts/build_web_console.sh - name: Upload web console - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: web-console path: web-console/build @@ -66,14 +66,14 @@ jobs: check-latest: true - name: Download web console - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 with: name: web-console path: web-console/build - name: Verify web console run: | - # upload-artifact v4 stores the contents of web-console/build at the zip root + # upload-artifact stores the contents of web-console/build at the zip root if [ -f web-console/index.html ]; then mkdir -p web-console/build find web-console -mindepth 1 -maxdepth 1 ! -name build -exec mv {} web-console/build/ \; @@ -99,7 +99,7 @@ jobs: sha256sum *.zip >> ./SHA256SUMS.txt - name: Upload archives - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: archives path: | @@ -110,7 +110,7 @@ jobs: if-no-files-found: error - name: Upload container binaries - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: container-binaries path: builds/binary @@ -125,7 +125,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download archives - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 with: name: archives path: . @@ -161,7 +161,9 @@ jobs: if: github.ref == 'refs/heads/main' env: GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }} - run: gh release delete development --cleanup-tag --yes || true + run: | + gh release delete development --yes || true + gh api --method DELETE "/repos/${GITHUB_REPOSITORY}/git/refs/tags/development" || true - name: Release (development rolling) if: github.ref == 'refs/heads/main' @@ -184,6 +186,22 @@ jobs: builds/build_timestamp.txt builds/SHA256SUMS.txt + - name: Point development tag at this commit + if: github.ref == 'refs/heads/main' + env: + GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }} + run: | + # GitHub does not move an existing tag via target_commitish. + if gh api "/repos/${GITHUB_REPOSITORY}/git/refs/tags/development" >/dev/null 2>&1; then + gh api --method PATCH "/repos/${GITHUB_REPOSITORY}/git/refs/tags/development" \ + -f sha="${GITHUB_SHA}" \ + -F force=true + else + gh api --method POST "/repos/${GITHUB_REPOSITORY}/git/refs" \ + -f ref="refs/tags/development" \ + -f sha="${GITHUB_SHA}" + fi + container-images: name: Container image needs: build-binaries @@ -203,7 +221,7 @@ jobs: uses: actions/checkout@v7 - name: Download container binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 with: name: container-binaries path: builds