Skip to content

Commit

Permalink
Automatically create a pre-release for each merge to master (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalten authored Sep 24, 2022
1 parent 09b0b43 commit 04d8ada
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ jobs:

- name: Get git hash
run: |
echo -n "https://github.com/${GITHUB_REPOSITORY}/commit/" > src/runtime/version
git rev-parse --short HEAD | xargs >> src/runtime/version
VERSION="$(date --utc +%Y-%m-%d)-$(git rev-parse --short HEAD)"
echo -n "https://github.com/${GITHUB_REPOSITORY}/releases/tag/build-${VERSION}" > src/runtime/version
echo "${VERSION}" > tag.txt
- name: Build
- name: Build (x86)
if: contains(matrix.qemu_arch, 'x86')
env:
ARCHITECTURE: ${{ matrix.appimage_arch }}
Expand All @@ -59,18 +60,17 @@ jobs:
dockerRunArgs: |
--volume "${PWD}/out:/out"
--volume "${PWD}/src:/src"
run: |
./build.sh
# echo "artifactName=$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
run: ./build.sh

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: ./out/*

- name: Upload to releases
- name: Create Release
if: github.event_name != 'pull_request' && github.ref_name == 'master'
uses: softprops/action-gh-release@v1
with:
files: out/*
tag_name: continuous

run: |
VERSION="$(cat tag.txt)"
gh release create --prerelease --title "Build ${VERSION}" "build-${VERSION}" out/* \
|| gh release upload "build-${VERSION}" out/*

0 comments on commit 04d8ada

Please sign in to comment.