Skip to content

Commit 4e9194f

Browse files
committed
simplify release
1 parent 7b47d1f commit 4e9194f

File tree

1 file changed

+16
-42
lines changed

1 file changed

+16
-42
lines changed

.github/workflows/cppcmake.yml

Lines changed: 16 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- name: Package
7979
run: cmake --build build --config Release -j --target package
8080

81-
# TODO: Build artifact paths from variables
81+
# TODO: upload-artifact@v2 (in-progress) will support file glob
8282
- name: Upload Artifacts (ubuntu)
8383
if: matrix.os == 'ubuntu-latest'
8484
uses: actions/upload-artifact@master
@@ -104,18 +104,8 @@ jobs:
104104
needs: build
105105
runs-on: ubuntu-latest
106106
steps:
107-
- name: Create Release
108-
if: startsWith(github.ref, 'refs/tags/')
109-
id: create_release
110-
uses: actions/create-release@v1
111-
env:
112-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113-
with:
114-
tag_name: ${{ github.ref }}
115-
release_name: Release ${{ github.ref }}
116-
draft: false
117-
prerelease: false
118-
107+
108+
# TODO: download-artifact@v2 will support multiple download
119109
- name: Download Artifact (ubuntu)
120110
if: startsWith(github.ref, 'refs/tags/')
121111
uses: actions/download-artifact@v1
@@ -134,35 +124,19 @@ jobs:
134124
with:
135125
name: pkg-macOS-latest
136126

137-
- name: Upload Release Asset (ubuntu)
138-
if: startsWith(github.ref, 'refs/tags/')
139-
uses: actions/upload-release-asset@v1
140-
env:
141-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142-
with:
143-
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
144-
asset_path: pkg-ubuntu-latest/AudioCapture-0.1-Linux64-bionic.deb
145-
asset_name: AudioCapture-0.1-Linux64-bionic.deb
146-
asset_content_type: application/vnd.debian.binary-package
147-
148-
- name: Upload Release Asset (macOS)
149-
if: startsWith(github.ref, 'refs/tags/')
150-
uses: actions/upload-release-asset@v1
151-
env:
152-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153-
with:
154-
upload_url: ${{ steps.create_release.outputs.upload_url }}
155-
asset_path: pkg-macOS-latest/AudioCapture-0.1-OSX64.tar.bz2
156-
asset_name: AudioCapture-0.1-OSX64.tar.bz2
157-
asset_content_type: application/octet-stream
158-
159-
- name: Upload Release Asset (windows)
127+
- name: Create Release
160128
if: startsWith(github.ref, 'refs/tags/')
161-
uses: actions/upload-release-asset@v1
129+
id: create_release
130+
uses: softprops/action-gh-release@v1
162131
env:
163-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164133
with:
165-
upload_url: ${{ steps.create_release.outputs.upload_url }}
166-
asset_path: pkg-windows-latest/AudioCapture-0.1-Win64.zip
167-
asset_name: AudioCapture-0.1-Win64.zip
168-
asset_content_type: application/x-7z-compressed
134+
# tag_name: ${{ github.ref }} # ${{ github.ref }} is default
135+
name: Release ${{ github.ref }}
136+
draft: false
137+
prerelease: false
138+
# body_path: CHANGELOG.txt
139+
files: |
140+
pkg-ubuntu-latest/AudioCapture-0.1-Linux64-bionic.deb
141+
pkg-macOS-latest/AudioCapture-0.1-OSX64.tar.bz2
142+
pkg-windows-latest/AudioCapture-0.1-Win64.zip

0 commit comments

Comments
 (0)