From 59edbbd132a826d7d093a2cab8ee31f25034a344 Mon Sep 17 00:00:00 2001 From: Takeshi NAMAO Date: Fri, 27 Sep 2024 15:38:08 +0900 Subject: [PATCH] =?UTF-8?q?Actions=20workflow=20=E3=81=AB=20canary=20?= =?UTF-8?q?=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9=E7=94=A8=E3=81=AE=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 25 +++++++++++++++++++------ CHANGES.md | 4 ++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdb37bd..c64d3f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,9 +46,22 @@ jobs: gzip dist/* - name: Release run: | - ghr -t "${{ secrets.GITHUB_TOKEN }}" \ - -u "${{ github.repository_owner }}" \ - -r "sora_exporter" \ - -n "${{ github.ref }}" \ - --replace "${GITHUB_REF##*/}" \ - dist/ + VERSION=$(git describe --tag --abbrev=0) + if [[ "${VERSION}" == *"canary"* ]]; then + ghr -t "${{ secrets.GITHUB_TOKEN }}" \ + -u "${{ github.repository_owner }}" \ + -r "sora_exporter" \ + -n "${VERSION}" \ + -replace \ + -prerelease \ + "${GITHUB_REF##*/}" \ + dist/ + else + ghr -t "${{ secrets.GITHUB_TOKEN }}" \ + -u "${{ github.repository_owner }}" \ + -r "sora_exporter" \ + -n "${VERSION}" \ + -replace \ + "${GITHUB_REF##*/}" \ + dist/ + fi diff --git a/CHANGES.md b/CHANGES.md index 1454809..8360cd1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,8 +29,12 @@ - [UPDATE] Github Actions のイメージを更新する - actions/setup-go v4 => v5 - dominikh/staticcheck-action v1.3.0 => v1.3.1 + - @tnamao - [UPDATE] CI で実行する staticcheck のバージョンを更新する - 2023.1.6 => 2024.1.1 + - @tnamao +- [ADD] CI のリリースに canary リリースの対応を追加する + - @tnamao ## 2024.6.0