Skip to content

Commit 7384cb4

Browse files
Attach rpm when doing a release (#2)
Attach rpm when doing a release
1 parent 40c0871 commit 7384cb4

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
runs-on: ubuntu-latest
1010
permissions:
11-
contents: read
11+
contents: write
1212
packages: write
1313

1414
steps:
@@ -25,7 +25,7 @@ jobs:
2525
settings-path: ${{ github.workspace }}
2626

2727
- name: Get version
28-
run: echo "RELEASE_VERSION=$(git describe --tags)" >> $GITHUB_ENV
28+
run: git describe --tags && echo "RELEASE_VERSION=$(git describe --tags)" >> $GITHUB_ENV
2929

3030
- name: Build
3131
run: docker build . --tag builder
@@ -37,3 +37,9 @@ jobs:
3737
run: mvn -s ${{ github.workspace}}/settings.xml -f rpm.pom.xml -B -Drevision=${{ env.RELEASE_VERSION }} -Dsha1= -Dchangelist= deploy
3838
env:
3939
GITHUB_TOKEN: ${{ github.token }}
40+
41+
- name: Attach rpm as artifact
42+
uses: softprops/action-gh-release@v1
43+
if: startsWith(github.ref, 'refs/tags/')
44+
with:
45+
files: target/rpm/com.teragrep-blf_02/RPMS/x86_64/com.teragrep-blf_02-*.rpm

0 commit comments

Comments
 (0)