Skip to content

Commit

Permalink
chore: publish package to github packages
Browse files Browse the repository at this point in the history
Use github actions to publish package.
Package is published when a commit is tagged with v*,
i.e. v1.0.0
  • Loading branch information
Jostein Solaas committed Oct 28, 2019
1 parent 12ca5ca commit 80e9df3
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 236 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build maven

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release to Github Packages

on:
push:
tags:
- v*

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Deploy to Github Package Registry
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
mvn --settings settings.xml -Drevision=${{ steps.get_version.outputs.VERSION }} deploy
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ nbdist/
# End of https://www.gitignore.io/api/java,maven,netbeans
/bin/
src/main/java/neqsim/util/database/NeqSimDataBase2.java

neqsim.iml
Loading

0 comments on commit 80e9df3

Please sign in to comment.