Skip to content

Commit 337a8d0

Browse files
committed
Make gradle-publish.yml again
1 parent 6cb6aa4 commit 337a8d0

1 file changed

Lines changed: 26 additions & 8 deletions

File tree

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6-
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7-
8-
# No Gradle publish workflow is needed for this branch
1+
name: Publish package to GitHub Packages
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-java@v3
14+
with:
15+
java-version: '8'
16+
distribution: 'adopt'
17+
- name: Chmod Gradle wrapper
18+
run: chmod +x gradlew
19+
- name: Validate Gradle wrapper
20+
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
21+
- name: Publish package
22+
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
23+
with:
24+
arguments: publish
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)