Skip to content

Commit 6e7af5d

Browse files
Merge pull request #3 from wiremock/release-flow
Automate releases to GitHub Packages
2 parents 60b4d0f + a00790b commit 6e7af5d

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Java
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
cache: maven
23+
24+
- name: Publish to GitHub Packages
25+
run: mvn -B release:prepare release:perform -s $GITHUB_WORKSPACE/settings.xml
26+
env:
27+
GITHUB_TOKEN: ${{ github.token }}
28+
29+
# Create a release
30+
- name: Run JReleaser
31+
uses: jreleaser/release-action@v2
32+
env:
33+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
# Persist JReleaser logs
36+
- name: JReleaser release output
37+
if: always()
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: jreleaser-release
41+
path: |
42+
out/jreleaser/trace.log
43+
out/jreleaser/output.properties
44+

pom.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>org.wiremock.integrations.testcontainers</groupId>
88
<artifactId>wiremock-testcontainers-module</artifactId>
99
<description>TestContainers module for WireMock</description>
10-
<version>1.0-SNAPSHOT</version>
10+
<version>1.0-alpha-1-SNAPSHOT</version>
1111

1212
<licenses>
1313
<license>
@@ -144,4 +144,12 @@
144144
</releases>
145145
</repository>
146146
</repositories>
147+
148+
<distributionManagement>
149+
<repository>
150+
<id>github</id>
151+
<name>GitHub Packages</name>
152+
<url>https://maven.pkg.github.com/wiremock/wiremock-testcontainers-java</url>
153+
</repository>
154+
</distributionManagement>
147155
</project>

0 commit comments

Comments
 (0)