Skip to content

Commit

Permalink
Merge pull request #36 from dvsa/feat-vol--5327
Browse files Browse the repository at this point in the history
fix: cd & maven yamal comments
  • Loading branch information
dean-sogeti authored May 20, 2024
2 parents e3c7b0a + 1f57825 commit 1330020
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jobs:
tag_name: ${{ steps.release.outputs.tag_name }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v4
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: maven



publish:
if: ${{needs.release-please.outputs.release_created}}
runs-on: ubuntu-latest
Expand All @@ -31,21 +30,25 @@ jobs:
needs:
- release-please
steps:
- name: checkout code
uses: actions/checkout@v4
- name: checkout code
uses: actions/checkout@v4

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

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

- name: Publish to GitHub Packages Apache Maven
uses: ./.github/workflows/maven.yaml
with:
maven-goal: deploy
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}


push:
if: ${{needs.release-please.outputs.release_created}}
permissions:
contents: read
packages: write

name: Publish to GitHub Packages Apache Maven
uses: ./.github/workflows/maven.yaml
secrets: inherit
with:
maven-goal: deploy
needs: release-please
13 changes: 9 additions & 4 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ on:

permissions:
contents: read

packages: write


jobs:
build:
name: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } },{ "id":"github", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'

- run: mvn -B -P github ${{ inputs.maven-goal}}



0 comments on commit 1330020

Please sign in to comment.