Skip to content

Commit

Permalink
Attempt GH upload after build
Browse files Browse the repository at this point in the history
  • Loading branch information
cawilliamson committed Aug 27, 2024
1 parent 58e4ca6 commit e4bd46e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/build-gsi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ on:

env:
DISABLE_RUNNER_CLEANUP: false # should ONLY be set to true for debugging
MAINTAINER: cawilliamson
REPO_NAME: treble_voltage
ROM_NAME: VoltageOS
ROM_VERSION: 3.6
ROM_VERSION: 3.6

jobs:
build-gsi:
Expand Down Expand Up @@ -254,6 +256,20 @@ jobs:
mkdir -p "${webDir}"
cp -fv *.img.xz "${webDir}/"
working-directory: tmp
- name: upload to github
run: |
buildDate=$(cat cachedBuildDate.txt)
webDir="/var/www/html/${ROM_NAME}-${ROM_VERSION}-${buildDate}"
pushd "${webDir}/"
# set default repo
gh repo set-default "${MAINTAINER}/${REPO_NAME}"
# create release
gh release create -d -n "" -t "${ROM_NAME} ${ROM_VERSION}-${buildDate}" "${ROM_VERSION}-${buildDate}"
# upload files
gh release upload "${ROM_VERSION}"-"${buildDate}" --clobber -- *.img.xz
popd
- name: cleanup work directory
uses: eviden-actions/clean-self-hosted-runner@v1
if: ${{ always() }} # Run even if previous steps in the job fail or are canceled

0 comments on commit e4bd46e

Please sign in to comment.