-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from deprecate release actions to softprops/action-gh-release
- Loading branch information
1 parent
6e79696
commit d51192a
Showing
1 changed file
with
10 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|