Skip to content

Delete old nightly release (#36) #5

Delete old nightly release (#36)

Delete old nightly release (#36) #5

Workflow file for this run

name: Nightly
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Assemble with Gradle
run: ./gradlew -PcommitCount=$(git rev-list --count master) -PcommitHash=$(git rev-parse --short master) -PstorePassword="${{ secrets.NIGHTLY_KEYSTORE_PASSWORD }}" -PkeyPassword="${{ secrets.NIGHTLY_KEYSTORE_PASSWORD }}" assembleNightlySigned
- name: Upload authenticator APK
uses: actions/upload-artifact@v4
with:
name: authenticator.apk
path: authenticator/build/outputs/apk/nightly/signed/authenticator-nightly-signed.apk
if-no-files-found: error
- name: Upload companion APK
uses: actions/upload-artifact@v4
with:
name: companion.apk
path: companion/build/outputs/apk/nightly/signed/companion-nightly-signed.apk
if-no-files-found: error
- name: Delete existing nightly tag
run: git push origin --delete nightly || true
- name: Delete existing nightly release
run: |
curl -X DELETE
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"
https://api.github.com/repos/${{ github.repository }}/releases/tags/nightly
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
authenticator/build/outputs/apk/nightly/signed/authenticator-nightly-signed.apk
companion/build/outputs/apk/nightly/signed/companion-nightly-signed.apk
name: Nightly Release
tag_name: nightly
body: |
Nightly build for commit ${{ github.sha }}.
draft: false
prerelease: true