Skip to content

Commit 5c3a835

Browse files
committed
ffs I can't test the windows exe because github makes actions' artifacts require login, which I can't easily do in my VM. That's stupid, anyway. I want everything to be publicly accessible (unless it's an gpg key using for signing releases or something)
Let's see if I can make artifacts automatically trigger releases as that seems to be the only way to make actions' artifacts public
1 parent cc45c52 commit 5c3a835

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,35 @@ jobs:
2323

2424
- uses: actions/upload-artifact@v2
2525
with:
26-
name: Linux AppImage (x86_64)
26+
name: helloWorld-linux-x86_64
2727
path: dist/
2828

29+
- name: Create dist tarball
30+
run: 'tar -czvf helloWorld-linux-x86_64.`date "+%Y%m%d_%H%M%S"`.tar.bz2 dist/*'
31+
shell: bash
32+
33+
- name: Create Release
34+
id: create_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
tag_name: ${{ github.ref }}
40+
release_name: Public Build Artifact ${{ github.ref }}
41+
draft: false
42+
prerelease: true
43+
44+
- name: Upload Release Asset
45+
id: upload-release-asset
46+
uses: actions/upload-release-asset@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
with:
50+
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
51+
#asset_path: dist
52+
asset_name: helloWorld-linux*.tar.bz2
53+
asset_content_type: application/x-bzip2
54+
2955
# windows:
3056
# runs-on: windows-latest
3157
#

0 commit comments

Comments
 (0)