Skip to content

Commit 5ab29a0

Browse files
authored
Create publish-gradle-pkg.yml
1 parent 276da5e commit 5ab29a0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
name: Publish package to GitHub Packages
3+
on:
4+
release:
5+
types: [created]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-java@v1
12+
with:
13+
java-version: 1.8
14+
15+
- name: Publish package
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
run: |
19+
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
20+
echo "New version: ${NEW_VERSION}"
21+
echo "Github username: ${GITHUB_ACTOR}"
22+
gradle -Pversion=${NEW_VERSION} build publish

0 commit comments

Comments
 (0)