Skip to content

Commit 3e8f52b

Browse files
committed
single action!
1 parent 349ffa8 commit 3e8f52b

File tree

2 files changed

+26
-65
lines changed

2 files changed

+26
-65
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build
22

33
on:
4+
release:
5+
types:
6+
- published
47
push:
58
branches:
69
- '**'
@@ -9,10 +12,12 @@ on:
912
pull_request:
1013

1114
permissions:
12-
contents: read
15+
id-token: write
16+
attestations: write
17+
contents: write
1318

1419
jobs:
15-
build:
20+
release:
1621
runs-on: ubuntu-latest
1722
steps:
1823
- name: Checkout
@@ -29,13 +34,32 @@ jobs:
2934
with:
3035
validate-wrappers: true
3136

37+
- name: Enable gradlew execution
38+
run: chmod +x ./gradlew
39+
3240
- name: Gradle Build
3341
run: ./gradlew build
3442

43+
- name: Attest Build Provenance
44+
uses: actions/attest-build-provenance@v2
45+
with:
46+
subject-path: 'build/libs/*.jar, !build/libs/*-sources.jar'
47+
3548
- name: Upload Artifacts
3649
uses: actions/upload-artifact@v4
3750
with:
3851
name: Artifacts
3952
path: |
4053
build/libs/*.jar
4154
!build/libs/*-sources.jar
55+
56+
- name: Maven Publish
57+
if: github.event_name == 'release' && github.event.action == 'published'
58+
run: ./gradlew publish
59+
60+
- name: Github Publish
61+
if: github.event_name == 'release' && github.event.action == 'published'
62+
uses: AButler/[email protected]
63+
with:
64+
files: 'build/libs/*.jar;!build/libs/*-sources.jar'
65+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)