Skip to content

Commit

Permalink
ncipollo release action and not SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
Til7701 committed Mar 14, 2024
1 parent f8dce16 commit 5c5f1e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
workflow_call:
inputs:
version:
required: false
required: true
type: string
default: 0.0.1-SNAPSHOT #should be equal to the version of the maven project

jobs:
verify:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dev-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.step1.outputs.version }}
shortVersion: ${{ steps.step1.outputs.shortVersion }}
steps:
- id: step1
run: |
project_version="0.0.1"
echo "shortVersion=${project_version}" >> "$GITHUB_OUTPUT"
date=$(date +'%Y%m%d%H%M%S')
version=${project_version}-alpha+${date}
echo "${version}"
echo "version=${version}" >> "$GITHUB_OUTPUT"
build:
uses: ./.github/workflows/build.yaml
with:
version: ${{ needs.create-version-string.outputs.shortVersion }}
secrets: inherit

release:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ jobs:
- name: List artifacts
run: ls -al

- uses: softprops/action-gh-release@v2
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ inputs.tag }}
tag: ${{ inputs.tag }}
commit: ${{ github.sha }}
prerelease: ${{ inputs.prerelease }}
name: ${{ inputs.tag }}
files: |
*.jar
*.deb
*.exe
name: "Alpha Release: ${{ inputs.tag }}"
artifacts: "*.jar,*.deb,*.exe"
2 changes: 2 additions & 0 deletions .github/workflows/tagged-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
build:
uses: ./.github/workflows/build.yaml
with:
version: ${{ needs.create-version-string.outputs.version }}
secrets: inherit

release:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revision>0.0.1-SNAPSHOT</revision>
<revision>0.0.1</revision>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<spring.boot.version>3.2.2</spring.boot.version>
Expand Down

0 comments on commit 5c5f1e8

Please sign in to comment.