Prerelease (Github Package Registry) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prerelease (Github Package Registry) | |
on: | |
workflow_dispatch: | |
env: | |
IMAGE: ghcr.io/${{ github.repository }}/klage-kodeverk:${{ github.sha }} | |
jobs: | |
prerelease: | |
name: Create prerelease | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout | |
- id: next_version | |
uses: zwaldowski/semver-release-action@main | |
name: Prepare and tag release with semver | |
with: | |
bump: prerelease | |
preid: rc | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: upload artifact | |
run: ./gradlew -Pversion="$(echo ${{steps.next_version.outputs.version_tag}})" publish | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{steps.next_version.outputs.version_tag}} | |
release_name: v${{steps.next_version.outputs.version_tag}} | |
prerelease: true |