Skip to content

Commit

Permalink
actions
Browse files Browse the repository at this point in the history
  • Loading branch information
abstratt committed Sep 1, 2021
1 parent 966282d commit d84d071
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Maven
run: |
echo "<settings><servers><server><id>github</id><username>abstratt</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > tmp-deploy-settings.xml
mvn -X -B package --settings tmp-deploy-settings.xml
env:
GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }}

0 comments on commit d84d071

Please sign in to comment.