Skip to content

Commit

Permalink
Migrate from deprecate release actions to softprops/action-gh-release
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed May 3, 2024
1 parent 6e79696 commit d51192a
Showing 1 changed file with 10 additions and 39 deletions.
49 changes: 10 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,49 +58,20 @@ jobs:
rm -r "elmahio-linux-x64"
rm -r "elmahio-osx-x64"
- name: Create the Release
id: create_release
- name: Create Release
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
uses: softprops/action-gh-release@v2
with:
files: |
./artifacts/elmahio-win-x64.zip
./artifacts/elmahio-linux-x64.tar.gz
./artifacts/elmahio-osx-x64.tar.gz
tag_name: 5.1.${{ github.run_number }}
release_name: Release 5.1.${{ github.run_number }}
name: 5.1.${{ github.run_number }}
draft: false

- name: Upload elmahio-win-x64.zip
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/elmahio-win-x64.zip
asset_name: elmahio-win-x64.zip
asset_content_type: application/zip

- name: Upload elmahio-linux-x64.zip
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/elmahio-linux-x64.tar.gz
asset_name: elmahio-linux-x64.tar.gz
asset_content_type: application/gzip

- name: Upload elmahio-osx-x64.zip
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/elmahio-osx-x64.tar.gz
asset_name: elmahio-osx-x64.tar.gz
asset_content_type: application/gzip
fail_on_unmatched_files: true
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}

- name: Push to nuget.org
run: dotnet nuget push src/Elmah.Io.Cli/nupkg/Elmah.Io.Cli.5.1.${{ github.run_number }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
Expand Down

0 comments on commit d51192a

Please sign in to comment.