From e33726f526cfcd4004d20f35ea574d021a567a81 Mon Sep 17 00:00:00 2001 From: iTrooz_ Date: Sun, 19 Jun 2022 15:16:03 +0200 Subject: [PATCH] git: Added automatic release and source tar upload on release (#537) * added release.yml * Build CI now only triggers on branch push --- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb4b36da7..ac8a75e7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,7 @@ name: Build on: push: + branches: ["*"] pull_request: env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..33fad8a08 --- /dev/null +++ b/.github/workflows/release.yml @@ -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