Skip to content

Commit 7a0d91d

Browse files
authored
Merge pull request #8 from cortexapps/publish-action
Github action to automatically publish github packages
2 parents cb3c48f + e169a4a commit 7a0d91d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test and Gradle Publish
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
name: 'Test and Publish'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- uses: actions/setup-java@v3
14+
with:
15+
distribution: 'temurin'
16+
java-version: 17
17+
18+
- name: Run tests
19+
uses: gradle/gradle-build-action@v2
20+
with:
21+
arguments:
22+
check
23+
24+
25+
- name: Publish with Gradle
26+
uses: gradle/gradle-build-action@v2
27+
if: github.ref == 'refs/heads/master'
28+
env:
29+
GITHUB_USERNAME: ${{secrets.GITHUB_ACTOR}}
30+
GITHUB_PASSWORD: ${{secrets.GITHUB_TOKEN}}
31+
with:
32+
arguments:
33+
publish

0 commit comments

Comments
 (0)