Publish package to GitHub Packages #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to GitHub Packages | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout sources | |
with: | |
depth: 0 | |
fetch-tags: true | |
- uses: actions/setup-java@v4 | |
name: Setup Java 17 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Build and publish | |
run: ./gradlew publish --no-daemon | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |