Skip to content

Publish package to GitHub Packages #3

Publish package to GitHub Packages

Publish package to GitHub Packages #3

Workflow file for this run

name: Publish package to GitHub Packages
on:
workflow_dispatch:
inputs:
version:
description: "Version name to publish (eg: x.x.x)"
type: string
required: true
jobs:
publish:
timeout-minutes: 15
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: aboutbits/github-actions-java/setup@v3
- name: Set Version
run: sed -i 's|<version>BUILD-SNAPSHOT</version>|<version>${{ github.event.inputs.version }}</version>|g' pom.xml
- name: Publish package
run: mvn -s $GITHUB_WORKSPACE/.github/workflows/maven-settings.xml --batch-mode deploy
env:
GITHUB_USER_NAME: ${{ github.actor }}
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag:
timeout-minutes: 5
runs-on: ubuntu-22.04
needs: publish
steps:
- uses: actions/checkout@v4
- name: Tag Deployment
uses: aboutbits/github-actions-base/git-create-or-update-tag@v1
with:
tag-name: ${{ github.event.inputs.version }}
user-name: 'AboutBits'
user-email: '[email protected]'