Skip to content

Commit

Permalink
Update release.yml to use action-gh-release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kestrel Gregorich-Trevor committed Jan 18, 2024
1 parent ac4eb8d commit 9816540
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code.
uses: actions/checkout@v3
Expand Down Expand Up @@ -47,24 +49,7 @@ jobs:
run: |
zip -rq ${{github.workspace}}/zenzizenzizenzic-${{ runner.os }} ${{github.workspace}}/build/zenzizenzizenzic_ncurses ${{github.workspace}}/build/data/ ${{github.workspace}}/README.md ${{github.workspace}}/LICENSE
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
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 it's 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: ./zenzizenzizenzic-${{ runner.os }}.zip
asset_name: zenzizenzizenzic-${{ runner.os }}.zip
asset_content_type: application/zip
files: ${{github.workspace}}/zenzizenzizenzic-${{ runner.os }}=

0 comments on commit 9816540

Please sign in to comment.