Skip to content

Create Maven Release #28

Create Maven Release

Create Maven Release #28

Workflow file for this run

name: Create Maven Release
on:
workflow_dispatch:
inputs:
version:
description: "Version number"
jobs:
maven-release:
runs-on: ubuntu-latest
permissions:
actions: read|write|none

Check failure on line 11 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Create Maven Release

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 11, Col: 16): Unexpected value 'read|write|none' .github/workflows/main.yml (Line: 12, Col: 15): Unexpected value 'read|write|none'
checks: read|write|none
contents: read|write|none
deployments: read|write|none
issues: read|write|none
packages: read|write|none
pull-requests: read|write|none
repository-projects: read|write|none
security-events: read|write|none
statuses: read|write|none
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
server-id: 'github' # Value of the distributionManagement/repository/id field of the pom.xml
- name: Check
run: java -version && mvn -version && cat /home/runner/.m2/settings.xml
# - name: Create settings
# run: echo "<settings><interactiveMode>false</interactiveMode><profiles/><servers><server><id>github</id><configuration><httpHeaders><property><name>Authorization</name><value>Bearer ${{ secrets.GITHUB_TOKEN }}</value></property></httpHeaders></configuration></server></servers><mirrors /></settings>" > ~/.m2/settings.xml
- name: Configure Git user
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
- name: Build with maven
run: mvn clean package -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release with maven
run: mvn -DskipTests -Dmaven.test.skip=true -B -Dresume=false release:prepare release:perform -Darguments=-DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.site.deploy.skip=true -DreleaseVersion=${{ inputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}