From d64ce30a268904ca185201180395750418b27106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20M=C3=BCller?= Date: Sat, 28 Oct 2023 23:11:35 +0200 Subject: [PATCH] ci: new actions --- .github/workflows/deploy_github_macos.yml | 29 +++++++------------- .github/workflows/deploy_github_windows.yml | 30 ++++++--------------- 2 files changed, 17 insertions(+), 42 deletions(-) diff --git a/.github/workflows/deploy_github_macos.yml b/.github/workflows/deploy_github_macos.yml index 02c1737..2e522d5 100644 --- a/.github/workflows/deploy_github_macos.yml +++ b/.github/workflows/deploy_github_macos.yml @@ -7,7 +7,7 @@ on: jobs: build: - name: Create Release + name: macOS Release runs-on: macos-latest steps: - name: Set env @@ -39,23 +39,12 @@ jobs: draft: true prerelease: false - - name: Upload Release Asset DMG - id: upload-release-asset-dmg - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build-recipes/dist/DCKit_${{ env.RELEASE_VERSION }}.dmg - asset_name: DCKit_${{ env.RELEASE_VERSION }}.dmg - asset_content_type: application/zip - - name: Upload Release Asset PGK - id: upload-release-asset-pkg - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: "marvinpinto/action-automatic-releases@latest" with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build-recipes/dist/DCKit.pkg - asset_name: DCKit.pkg - asset_content_type: application/zip + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + draft: true + title: "DCKit ${{ env.RELEASE_VERSION }}" + files: | + ./build-recipes/dist/*.dmg + ./build-recipes/dist/*.pkg diff --git a/.github/workflows/deploy_github_windows.yml b/.github/workflows/deploy_github_windows.yml index 2734f56..375b0e7 100644 --- a/.github/workflows/deploy_github_windows.yml +++ b/.github/workflows/deploy_github_windows.yml @@ -7,7 +7,7 @@ on: jobs: build: - name: Create Release + name: Windows Release runs-on: windows-latest steps: - name: Set env @@ -30,26 +30,12 @@ jobs: # Run the binary (the most simple test) dist\\DCKit\\DCKit.exe --version python win_make_iss.py - ISCC.exe /Q /Q win_dckit.iss - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + ISCC.exe /Q win_dckit.iss + - uses: "marvinpinto/action-automatic-releases@latest" with: - tag_name: ${{ github.ref }} - release_name: DCKit ${{ github.ref }} - body: | - ![](https://img.shields.io/github/downloads/DC-analysis/DCKit/${{ env.RELEASE_VERSION }}/total.svg) - - draft: true + repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - - name: Upload Release Asset EXE - id: upload-release-asset-exe - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./build-recipes/Output/* - asset_content_type: application/zip + draft: true + title: "DCKit ${{ env.RELEASE_VERSION }}" + files: | + ./build-recipes/Output/*.exe