From b151439df92f60169a77c63ac171e6577221762c Mon Sep 17 00:00:00 2001 From: Jago de Vreede Date: Mon, 11 Nov 2024 21:24:59 +0100 Subject: [PATCH] build: Auto update released version in readme after release and cleanup in github actions --- .github/workflows/early-access.yml | 5 +- .github/workflows/release.yml | 7 ++- .github/workflows/windows-assemble.yml | 64 -------------------------- 3 files changed, 8 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/windows-assemble.yml diff --git a/.github/workflows/early-access.yml b/.github/workflows/early-access.yml index 1b17362..604ae07 100644 --- a/.github/workflows/early-access.yml +++ b/.github/workflows/early-access.yml @@ -3,6 +3,8 @@ name: Early Access on: push: branches: [ osx-build ] + paths-ignore: + - '**.md' env: JAVA_VERSION: '17' @@ -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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19a80cc..4908d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/windows-assemble.yml b/.github/workflows/windows-assemble.yml deleted file mode 100644 index 0f9a2ce..0000000 --- a/.github/workflows/windows-assemble.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Assemble - -on: - workflow_call: - inputs: - project-version: - required: true - type: string - -env: - gluon_version: 22.1.0.1-Final - -jobs: - assemble: - name: 'Assemble Windows' - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 0 - - - name: Cache local Maven repository - uses: actions/cache@v4 - with: - path: | - ~/.m2/repository - ~/.gluon - ~/.openjfx - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - - - name: Add msbuild to PATH - if: matrix.os == 'windows-latest' - uses: microsoft/setup-msbuild@v1.0.2 - - name: Visual Studio shell - if: matrix.os == 'windows-latest' - uses: egor-tensin/vs-shell@v1 - - name: Setup Gluon's GraalVM - uses: gluonhq/setup-graalvm@master - with: - graalvm: '22.1.0.1-Final' - jdk: 'java17' - arch: 'x86_64' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Build with Maven - run: ./mvnw -B clean install -DskipTests - - name: Compile native - run: ./mvnw -B gluonfx:compile -f sdkman-ui - - name: Link native - run: ./mvnw -B gluonfx:link -f sdkman-ui - - name: Assamble zip - run: | - ./mvnw -B org.apache.maven.plugins:maven-assembly-plugin:single@assemble-windows -f sdkman-ui - - - name: Upload package - uses: actions/upload-artifact@v4 - with: - retention-days: 1 - name: artifacts-${{ runner.os }}-${{ runner.arch }} - path: | - sdkman-ui/target/sdkman-ui-*.zip \ No newline at end of file