tag release #52
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: tag release | ||
on: workflow_dispatch | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' #Eclipse Temurin | ||
- uses: oneteme/automation-scripts/.github/actions/mvn-sonar-action@main | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' #Eclipse Temurin | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Deploy to OSSRH | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} #signer=bc | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
run: mvn --batch-mode --no-transfer-progress -Pdeploy deploy | ||
- name: Extract project version | ||
id: mvnVer | ||
run: echo "version=$(mvn help:evaluate -DforceStdout -Dexpression=project.version -q)" >>$GITHUB_OUTPUT | ||
outputs: | ||
version: ${{ steps.mvnVer.outputs.version }} | ||
release: | ||
needs: deploy | ||
runs-on: ubuntu-latest | ||
if: "!endsWith(needs.deploy.outputs.version, '-SNAPSHOT')" | ||
steps: | ||
- uses: oneteme/automation-scripts/.github/actions/tag-release@main | ||
with: | ||
version: {{ needs.deploy.outputs.version }} | ||
Check failure on line 48 in .github/workflows/release.yml GitHub Actions / tag releaseInvalid workflow file
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |