Skip to content

update permissions

update permissions #7

Workflow file for this run

name: Maven Package
on:
push:
tags:
- 'v[0-9][0-9]?.[0-9][0-9]?.[0-9][0-9]?'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
cache: maven
- name: Generate changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configuration: "{
\"categories\": [
{
\"title\": \"Commits\",
\"labels\": [\"*\"]
}
],
\"ignore_labels\": [\"skip-changelog\"],
\"pull_request_format\": \"{{title}}\",
\"commit_format\": \"{{message}}\"}"
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- ${{ steps.changelog.outputs.changelog }}
- name: Build with Maven
run: mvn -B package --file pom.xml --settings $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy --settings $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}