git: Added automatic release and source tar upload on release (#537)

* added release.yml

* Build CI now only triggers on branch push
This commit is contained in:
iTrooz_ 2022-06-19 15:16:03 +02:00 committed by GitHub
parent c238767750
commit e33726f526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View File

@ -2,6 +2,7 @@ name: Build
on:
push:
branches: ["*"]
pull_request:
env:

37
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,37 @@
permissions:
contents: write
name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Get sources
uses: actions/checkout@v3
with:
path: ImHex
submodules: recursive
- name: Create tarball from sources with dependencies
run: tar -cvf Full.Sources.tar.gz ImHex
- name: Download artifacts from latest workflow
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: build.yml
workflow_conclusion: success
skip_unpack: true
- name: Upload everything to release
uses: softprops/action-gh-release@v1
with:
files: |
*.zip
*.tar.gz