Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 2c63845

Browse files
committed
fix(CI): release hook added
1 parent 42bc717 commit 2c63845

2 files changed

Lines changed: 35 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
permissions:
1919
checks: write
2020
pull-requests: write
21+
contents: write
2122

2223
jobs:
2324
build:
@@ -53,10 +54,4 @@ jobs:
5354
if: always()
5455
with:
5556
files: |
56-
build/test-results/**/*.xml
57-
- name: Publish with Gradle
58-
run: ./gradlew -Pversion=${{ github.event.release.tag_name || '1.0-SNAPSHOT' }} publish
59-
if: github.event_name == 'release'
60-
env:
61-
ACTION_DEPLOY_USER: ${{ secrets.ACTION_DEPLOY_USER }}
62-
ACTION_DEPLOY_TOKEN: ${{ secrets.ACTION_DEPLOY_TOKEN }}
57+
build/test-results/**/*.xml

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
# This workflow uses actions that are not certified by GitHub.
3+
# They are provided by a third-party and are governed by
4+
# separate terms of service, privacy policy, and support
5+
# documentation.
6+
7+
# GitHub recommends pinning actions to a commit SHA.
8+
# To get a newer version, you will need to update the SHA.
9+
# You can also reference a tag or branch, but the action may change without warning.
10+
11+
name: Publish package
12+
on:
13+
release:
14+
types: [created]
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Java
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '18'
24+
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v3
28+
29+
- name: Publish with Gradle
30+
run: ./gradlew -Pversion=${{ github.event.release.tag_name || '1.0-SNAPSHOT' }} publish
31+
env:
32+
ACTION_DEPLOY_USER: ${{ secrets.ACTION_DEPLOY_USER }}
33+
ACTION_DEPLOY_TOKEN: ${{ secrets.ACTION_DEPLOY_TOKEN }}

0 commit comments

Comments
 (0)