This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
fix(workflows/publish): grant permissions to gradlew #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: Build and publish | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 21 | |
distribution: temurin | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build and publish | |
run: ./gradlew publish | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |