Skip to content

Commit

Permalink
Lisätty julkaisu
Browse files Browse the repository at this point in the history
  • Loading branch information
jkorri committed Jan 4, 2024
1 parent 052bc9b commit 70d56ed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
name: Viestinvalityspalvelu

name: viestinvalityspalvelu
on:
workflow_dispatch:
release:
types: [ created ]
push:
paths-ignore:
- '**.md'

jobs:
test-and-build:
build-and-deploy:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 17
uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
distribution: 'corretto'
cache: 'maven'

- uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Helsinki"
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn clean package

- name: Build with Maven
- name: Deploy
if: ${{ success() }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: mvn clean verify -B -Dbranch=${GITHUB_REF_NAME} -Drevision=${GITHUB_SHA} -DbuildNumber=${GITHUB_RUN_NUMBER}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn deploy --batch-mode -DskipTests -pl kirjasto
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@
</plugins>
</build>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/Opetushallitus/viestinvalityspalvelu</url>
</repository>
</distributionManagement>

<repositories>
<repository>
<id>github</id>
Expand Down

0 comments on commit 70d56ed

Please sign in to comment.