diff --git a/.github/workflows/build-gsi.yml b/.github/workflows/build-gsi.yml index fb29c6f..9817866 100644 --- a/.github/workflows/build-gsi.yml +++ b/.github/workflows/build-gsi.yml @@ -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: @@ -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