Skip to content

Commit

Permalink
Merge pull request #479 from statisticsnorway/update-workflows
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
jonolehagemo authored Mar 4, 2024
2 parents 5d8e7e3 + 7d34684 commit 5df5ece
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/on_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run checks

on:
push:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Build with Maven
run: mvn --batch-mode -P github package

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Create pre-release

on:
push:
tags:
- "pre-release-v*.*.*"
release:
types:
- prereleased

jobs:
build:
Expand All @@ -17,6 +17,7 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Set version with Maven
run: mvn --batch-mode -U versions:set -DnewVersion=${{github.ref_name}}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yml → .github/workflows/on_release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Main
name: Create release

on:
push:
tags:
- "v*.*.*"

release:
types:
- released
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -17,6 +16,7 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'

- name: Set version with Maven
run: mvn --batch-mode -U versions:set -DnewVersion=${{github.ref_name}}
Expand Down

0 comments on commit 5df5ece

Please sign in to comment.