Skip to content

Commit

Permalink
build: Auto update released version in readme after release and clean…
Browse files Browse the repository at this point in the history
…up in github actions
  • Loading branch information
jagodevreede committed Nov 11, 2024
1 parent a1343cf commit b151439
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 68 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Early Access
on:
push:
branches: [ osx-build ]
paths-ignore:
- '**.md'

env:
JAVA_VERSION: '17'
Expand Down Expand Up @@ -45,8 +47,7 @@ jobs:
assemble:
needs: [ precheck ]
if: endsWith(${{ needs.precheck.outputs.VERSION }}, '-SNAPSHOT')
#todo switch to main
uses: jagodevreede/sdkman-ui/.github/workflows/assemble-native.yml@osx-build
uses: jagodevreede/sdkman-ui/.github/workflows/assemble-native.yml@main
with:
project-version: ${{ needs.precheck.outputs.VERSION }}

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
assemble:
needs: [ precheck ]
uses: jagodevreede/sdkman-ui/.github/workflows/reusable-assemble.yml@main
uses: jagodevreede/sdkman-ui/.github/workflows/assemble-native.yml@main
with:
project-version: ${{ needs.precheck.outputs.VERSION }}

Expand Down Expand Up @@ -73,9 +73,12 @@ jobs:
id: vars
shell: bash
run: |
./mvnw -B versions:set versions:commit -DnextSnapshot=true
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Action"
sed -i '' 's/v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/v${{ github.event.inputs.VERSION }}/g; s/[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\.zip/${{ github.event.inputs.VERSION }}.zip/g' README.md
git add README.md
git commit -m "Updating download links to version ${{ github.event.inputs.VERSION }}"
./mvnw -B versions:set versions:commit -DnextSnapshot=true
git commit -a -m "Preparing for next snapshot version"
git push origin main
64 changes: 0 additions & 64 deletions .github/workflows/windows-assemble.yml

This file was deleted.

0 comments on commit b151439

Please sign in to comment.