Skip to content

ci: add missing tag for creating release #19

ci: add missing tag for creating release

ci: add missing tag for creating release #19

Workflow file for this run

name: CI/CD
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: master
patchList: "ci, refactor, fix, style, chore"
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'zulu'
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Retrieve the keystore and decode it to a file
env:
ANDROID_RELEASE_KEYSTORE_FILE: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE }}
run: |
mkdir release
echo $ANDROID_RELEASE_KEYSTORE_FILE | base64 --decode > release/release.keystore
- name: Write local.properties
env:
ANDROID_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}
run: |
echo androidReleaseStoreFile=/release/release.keystore >> local.properties
echo androidReleaseStorePassword=$ANDROID_RELEASE_KEYSTORE_PASSWORD >> local.properties
echo androidReleaseKeyAlias=$ANDROID_RELEASE_KEY_ALIAS >> local.properties
echo androidReleaseKeyPassword=$ANDROID_RELEASE_KEY_PASSWORD >> local.properties
- name: Build release apk
run: ./gradlew :composeApp:assembleRelease
- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ steps.semver.outputs.next }}
body: Changelog Contents
token: ${{ github.token }}
artifacts: "composeApp/build/outputs/apk/release/composeApp-release.apk"
generateReleaseNotes: true
tag: ${{ steps.semver.outputs.next }}