From 31b075a6a601a4375d00098c8b25827ef374109a Mon Sep 17 00:00:00 2001 From: ohtaman Date: Wed, 20 Nov 2024 06:22:02 +0900 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9bddf33..4809b44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Create Release and Attach Artifacts on: push: tags: - - "release/v*.*.*" # この形式のタグが打たれた場合に実行 + - "release/v*.*.*" workflow_dispatch: jobs: @@ -17,26 +17,14 @@ jobs: with: python-version: "3.9" - # GitHub Release の作成 - - name: Create Release - id: create_release - uses: actions/create-release@v1 + - name: Install gh CLI + uses: actions/setup-gh@v3 with: - tag_name: ${{ github.ref_name }} # タグ名を使用 - release_name: "Release ${{ github.ref_name }}" # リリース名 - body: | - 🎉 New release: ${{ github.ref_name }} - Check out the attached artifacts and updates in this release! - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} - # リリースにアーティファクトを添付 - - name: Upload Artifacts to Release - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./dist/ # Poetry によって生成されたアーティファクトのディレクトリ - asset_name: streamlit-desktop-app-${{ github.ref_name }}.tar.gz - asset_content_type: application/gzip + - name: Create GitHub Release + id: create_release + run: | + gh release create ${{ github.ref_name }} ./dist/* \ + --title "Release ${{ github.ref_name }}" \ + --notes "🎉 New release: ${{ github.ref_name }}"