Skip to content

Commit 878af47

Browse files
committed
chore: upgraded github actions infrastructure
1 parent 21d6d39 commit 878af47

File tree

2 files changed

+51
-29
lines changed

2 files changed

+51
-29
lines changed

.github/workflows/build-Stacked.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ jobs:
44
build:
55
runs-on: macos-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- name: Set up JDK 21
9-
uses: actions/setup-java@v2
10-
with:
11-
java-version: '21'
12-
distribution: 'temurin'
13-
- name: Grant execute permission for gradlew
14-
run: chmod +x gradlew
15-
- name: Build with Gradle
16-
run: ./gradlew build --stacktrace
7+
- uses: actions/checkout@v4
8+
- name: Set up JDK 23
9+
uses: actions/setup-java@v4
10+
with:
11+
java-version: '23'
12+
distribution: 'temurin'
13+
cache: 'gradle'
14+
- name: Grant execute permission for gradlew
15+
run: chmod +x gradlew
16+
- name: Build with Gradle
17+
run: ./gradlew build --stacktrace
Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,46 @@
11
name: Publish Library
2-
on: [workflow_dispatch]
2+
concurrency:
3+
group: ${{ github.workflow }}
4+
on:
5+
workflow_dispatch:
36
jobs:
4-
build:
7+
publish:
58
runs-on: macos-latest
69
permissions:
7-
contents: read
10+
contents: write
811
packages: write
912
steps:
10-
- uses: actions/checkout@v2
11-
- name: Set up JDK 21
12-
uses: actions/setup-java@v2
13-
with:
14-
java-version: '21'
15-
distribution: 'temurin'
16-
server-id: github
17-
settings-path: ${{ github.workspace }}
18-
- name: Build with Gradle
19-
run: gradle build
20-
- name: Publish to GitHub Packages
21-
run: gradle publish
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
USERNAME: ${{ github.actor }}
25-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-java@v4
16+
with:
17+
java-version: '23'
18+
distribution: 'temurin'
19+
cache: 'gradle'
20+
21+
- name: Grant execute permission for gradlew
22+
run: chmod +x gradlew
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Set CalVer version
28+
id: calver
29+
run: echo "VERSION=$(date -u +'%Y.%-m')-$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
30+
31+
- name: Publish package
32+
run: ./gradlew publish --stacktrace
33+
env:
34+
FRUXZ_DEV_USER: ${{ secrets.FRUXZ_DEV_USER }}
35+
FRUXZ_DEV_SECRET: ${{ secrets.FRUXZ_DEV_SECRET }}
36+
GH_RELEASE_VERSION: ${{ env.VERSION }}
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GH_USERNAME: ${{ github.actor }}
39+
40+
- name: Create GitHub Release
41+
uses: elgohr/Github-Release-Action@v5
42+
with:
43+
tag: ${{ env.VERSION }}
44+
title: ${{ env.VERSION }}
45+
env:
46+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)