From 397162afd06e8d2c797658274e361e6f0e75c3d8 Mon Sep 17 00:00:00 2001 From: Yuki Sawa Date: Sat, 4 Nov 2023 16:36:17 -0700 Subject: [PATCH] clean --- .github/workflows/release.yaml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 194e590..26a1f19 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,16 @@ on: # types: [synchronize, opened, reopened, ready_for_review] jobs: - build-and-release: + create-release: + name: Create Release + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Create release + run: gh release create ${{ github.ref_name }} --generate-notes --title "Version ${{ github.ref_name }}" + + upload-release: name: Build and Release permissions: contents: write @@ -33,20 +42,21 @@ jobs: if: runner.os != 'windows-latest' run: zip -j cpa-${{ runner.os }}.zip ./target/release/cpa + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ github.ref_name }} "cpa-${{ runner.os }}.zip" --clobber + # run: tar czvf cpa-${{ runner.os }}.tar.gz -C ./target/release cpa # - name: Archive Release Binary (Windows) # if: runner.os == 'windows-latest' # run: Compress-Archive -Path ./target/release/cpa.exe -DestinationPath windows-cpa.zip # shell: pwsh - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release create ${{ github.ref_name }} "cpa-${{ runner.os }}.zip" --generate-notes --title "Version ${{ github.ref_name }}" - # run: gh release create ${{ github.ref_name }} "./target/release/cpa" --generate-notes --title "Version ${{ github.ref_name }}" + # run: gh release create ${{ github.ref_name }} "./target/release/cpa" --generate-notes --title "Version ${{ github.ref_name }}" - # run: >- - # echo ${{ github.ref_name }} - # gh release create ${{ github.ref_name }} "./target/release/cpa" --generate-notes --title "Version ${{ github.ref_name }}" + # run: >- + # echo ${{ github.ref_name }} + # gh release create ${{ github.ref_name }} "./target/release/cpa" --generate-notes --title "Version ${{ github.ref_name }}" # - name: Create Release # uses: softprops/action-gh-release@v1