Skip to content

Commit

Permalink
use commit instead of ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ate47 committed Jun 13, 2022
1 parent 28c074c commit 1cb3028
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,6 @@ on:
type: boolean

jobs:
publish:
runs-on: ubuntu-latest
if: ${{ inputs.publish_maven }}
permissions:
contents: read
packages: write
steps:
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- uses: actions/checkout@v2
- name: maven-settings-action
uses: s4u/maven-settings-action@v2.5.0
with:
servers: '[{"id": "sonatype-nexus-snapshots", "username": "${{ secrets.SONATYPE_NEXUS_USERNAME }}", "password": "${{ secrets.SONATYPE_NEXUS_PASSWORD }}"},{"id": "sonatype-nexus-staging", "username": "${{ secrets.SONATYPE_NEXUS_USERNAME }}", "password": "${{ secrets.SONATYPE_NEXUS_PASSWORD }}"}]'
- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy -P release
build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -70,6 +50,27 @@ jobs:
with:
name: "endpoint.jar"
path: "endpoint.jar"
publish:
needs: build
runs-on: ubuntu-latest
if: ${{ inputs.publish_maven }}
permissions:
contents: read
packages: write
steps:
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- uses: actions/checkout@v2
- name: maven-settings-action
uses: s4u/maven-settings-action@v2.5.0
with:
servers: '[{"id": "sonatype-nexus-snapshots", "username": "${{ secrets.SONATYPE_NEXUS_USERNAME }}", "password": "${{ secrets.SONATYPE_NEXUS_PASSWORD }}"},{"id": "sonatype-nexus-staging", "username": "${{ secrets.SONATYPE_NEXUS_USERNAME }}", "password": "${{ secrets.SONATYPE_NEXUS_PASSWORD }}"}]'
- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy -P release
osx:
needs: build
runs-on: macos-latest
Expand Down Expand Up @@ -150,7 +151,7 @@ jobs:
- name: Deploy artifacts
uses: ncipollo/release-action@v1
with:
commit: ${GITHUB_REF##*/}
commit: ${{ github.sha }}
tag: "v${{ inputs.version }}"
artifacts: "deploy_file/*"
name: "Release ${{ inputs.version }}"
Expand Down

0 comments on commit 1cb3028

Please sign in to comment.