diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..a645e4e8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/pom.xml b/pom.xml index a6a5e958..1832d4a8 100644 --- a/pom.xml +++ b/pom.xml @@ -69,9 +69,9 @@ - central - entur2-releases - https://entur2.jfrog.io/entur2/libs-release-local + github + GitHub Packages + https://maven.pkg.github.com/hsldevcom/jore4-tiamat-rutebanken-helpers snapshots