Skip to content

Commit

Permalink
Add workflow to publish to GitHub Packages
Browse files Browse the repository at this point in the history
- also removed entur's own jfrog repository for now from pom.xml
- temporarily disabled the running of unit tests before publishing as the pubsub-emulator dependency is unavailable
  • Loading branch information
pallost committed Feb 7, 2023
1 parent 7e1e09f commit 26398a0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish package to GitHub Packages

on:
push:
branches:
- main
pull_request:

jobs:
publish:
name: Publish package to GitHub Packages
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1

- name: Publish to Github Packages
# if: ${{ github.ref == 'refs/heads/main' }}
run: |
# temporarily removing unit tests from the process as a dependent package (pubsub-emulator) is unavailable
mvn --batch-mode -DskipTests -Dentur.google.pubsub.emulator.download.skip=true deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@

<distributionManagement>
<repository>
<id>central</id>
<name>entur2-releases</name>
<url>https://entur2.jfrog.io/entur2/libs-release-local</url>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/hsldevcom/jore4-tiamat-rutebanken-helpers</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
Expand Down

0 comments on commit 26398a0

Please sign in to comment.