From 3cb38aaf26c7d5084537df091ab79dd1df4ef693 Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:42:20 +0000 Subject: [PATCH 1/8] Maven 3.9.6 --- .github/workflows/maven.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 986e285..c557bfa 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,6 +23,9 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - uses: stCarolas/setup-maven@v5 + with: + maven-version: 3.9.6 - name: Set up JDK 17 uses: actions/setup-java@v3 with: From e9dd257ee15b3cfe2700d5b6edfdc137eaa13912 Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:43:22 +0000 Subject: [PATCH 2/8] Create release.yml --- .github/workflows/release.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8ec796c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: Release Build + +on: + release: + types: [created] + +jobs: + + build: + name: Build + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Set up Maven 3.9.6 + uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.9.6 + - name: Install Dependencies (Linux) + if: runner.os == 'Linux' + run: sudo apt-get install -y build-essential automake1.10 libtool + - name: Install Dependencies (Windows) + if: runner.os == 'Windows' + run: | + choco install -y msbuild + - name: Install Dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install automake autoconf libtool gcc + cd /usr/local/bin + ln -s c++-9 c++ + ln -s cpp-9 cpp + ln -s g++-9 g++ + ln -s gcc-9 gcc + export PATH=/usr/local/bin:$PATH + rehash + - name: Build with Maven + run: mvn clean package -B + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: Package + path: target/*.jar + + release: + name: Release + needs: build + runs-on: ubuntu-latest + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + name: Package + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: "*.jar" From 9c6e01734890f705a6f3d9e84790ce8a3e1ac95e Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:52:43 +0000 Subject: [PATCH 3/8] automake --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ec796c..1388c30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: maven-version: 3.9.6 - name: Install Dependencies (Linux) if: runner.os == 'Linux' - run: sudo apt-get install -y build-essential automake1.10 libtool + run: sudo apt-get install -y build-essential automake libtool - name: Install Dependencies (Windows) if: runner.os == 'Windows' run: | From 941dd6ce8d7b0f884f2cf19d2d80e0ed29d36066 Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:54:54 +0000 Subject: [PATCH 4/8] allow workflow dispatch for faster testing --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1388c30..dee6281 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: Release Build on: release: types: [created] + workflow_dispatch: jobs: From f0e7d05e07a83bb3e35f29256eec3d28c7205bf6 Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:03:35 +0000 Subject: [PATCH 5/8] recursively checkout repo --- .github/workflows/release.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dee6281..4a1323e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,10 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -37,13 +40,6 @@ jobs: if: runner.os == 'macOS' run: | brew install automake autoconf libtool gcc - cd /usr/local/bin - ln -s c++-9 c++ - ln -s cpp-9 cpp - ln -s g++-9 g++ - ln -s gcc-9 gcc - export PATH=/usr/local/bin:$PATH - rehash - name: Build with Maven run: mvn clean package -B - name: Upload Artifact From 0bb52e8de52cc7867a3947cf5a835ac344b3f8c4 Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:08:10 +0000 Subject: [PATCH 6/8] msbuild is microsoft-build-tools in choco --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a1323e..ea8aab2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Install Dependencies (Windows) if: runner.os == 'Windows' run: | - choco install -y msbuild + choco install -y microsoft-build-tools - name: Install Dependencies (macOS) if: runner.os == 'macOS' run: | From 6e43f7b38c0b397ee3cd891726585d47effd47c4 Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:13:25 +0000 Subject: [PATCH 7/8] Use setup-msbuild action rather than manual --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea8aab2..522d157 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,8 +34,7 @@ jobs: run: sudo apt-get install -y build-essential automake libtool - name: Install Dependencies (Windows) if: runner.os == 'Windows' - run: | - choco install -y microsoft-build-tools + uses: microsoft/setup-msbuild@v2 - name: Install Dependencies (macOS) if: runner.os == 'macOS' run: | From bd2eafb796940144a5f653b6222628953d93d1fe Mon Sep 17 00:00:00 2001 From: gptlang <121417512+gptlang@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:23:04 +0000 Subject: [PATCH 8/8] bump versions and add write permission --- .github/workflows/release.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 522d157..f5d3e5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,10 @@ on: types: [created] workflow_dispatch: -jobs: +permissions: + contents: write +jobs: build: name: Build runs-on: ${{ matrix.os }} @@ -16,17 +18,17 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: maven - name: Set up Maven 3.9.6 - uses: stCarolas/setup-maven@v4 + uses: stCarolas/setup-maven@v5 with: maven-version: 3.9.6 - name: Install Dependencies (Linux) @@ -42,7 +44,7 @@ jobs: - name: Build with Maven run: mvn clean package -B - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Package path: target/*.jar @@ -53,7 +55,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Package - name: Release