2022-06-19 15:16:03 +02:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
2022-06-29 15:01:08 +02:00
|
|
|
name: Release
|
|
|
|
env:
|
|
|
|
version: ${{ github.event.release.tag_name }}
|
2022-06-19 15:16:03 +02:00
|
|
|
|
|
|
|
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
|
2022-06-29 15:01:08 +02:00
|
|
|
branch: ${{ github.event.release.target_commitish }}
|
2022-06-19 15:16:03 +02:00
|
|
|
workflow_conclusion: success
|
|
|
|
skip_unpack: true
|
2022-06-29 15:01:08 +02:00
|
|
|
|
|
|
|
- name: Unzip files when needed
|
|
|
|
run: |
|
|
|
|
for zipfile in ./*.zip
|
|
|
|
do
|
|
|
|
if [ `zipinfo -1 "$zipfile" | wc -l` -eq 1 ];
|
|
|
|
then
|
|
|
|
echo "unzipping $zipfile"
|
|
|
|
unzip "$zipfile"
|
|
|
|
rm "$zipfile"
|
|
|
|
else
|
|
|
|
echo "keeping $zipfile zipped"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
- name: Rename Windows Portable Zip
|
|
|
|
run: mv "Windows Portable.zip" imhex-${{env.version}}-Windows-Portable.zip
|
|
|
|
|
2022-06-19 15:16:03 +02:00
|
|
|
- name: Upload everything to release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2022-06-29 15:01:08 +02:00
|
|
|
files: '*'
|