Prepare dina-base-api release #20
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: Prepare dina-base-api release | |
on: workflow_dispatch | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: dev | |
token: ${{ secrets.BICE_PAT }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Set Version | |
run: | | |
mvn -q build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion} versions:commit | |
mvn -q help:evaluate -Dexpression=project.version -q -DforceStdout > version.txt | |
- name: Push to dev | |
run: | | |
VERSION=$(cat version.txt) | |
rm version.txt | |
git config user.name github-actions | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "Prepare $VERSION release" | |
git status | |
git push origin dev | |
# git push https://AAFC-BICE:${GITHUB_TOKEN}@github.com/AAFC-BICoE/dina-base-api.git dev | |