Update issue templates #6
This file contains hidden or 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: Build and release | |
| on: | |
| release: | |
| types: [created] | |
| push: | |
| branches: | |
| - 'master' | |
| - '*-snapshot' | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-jar: | |
| name: "Build JAR" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: "Checkout" | |
| - uses: actions/setup-java@v4 | |
| name: "Install Java" | |
| with: | |
| java-version: '21' | |
| distribution: 'corretto' | |
| cache: 'maven' | |
| - name: "Build JAR" | |
| run: mvn -DskipTests -Pfatjar clean package | |
| - name: 'Get version' | |
| run: echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
| - name: 'Upload artifact' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'simplelocalize-cli-${{env.VERSION}}.jar' | |
| path: 'target/simplelocalize-cli-${{env.VERSION}}.jar' | |
| - name: 'Upload JAR to Release' | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: 'target/simplelocalize-cli-${{env.VERSION}}.jar' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-executable: | |
| name: "Build ${{ matrix.label }} executable" | |
| strategy: | |
| matrix: | |
| include: | |
| - os: 'ubuntu-latest' | |
| label: 'linux' | |
| filename: 'simplelocalize-cli' | |
| downloadFilename: 'simplelocalize-cli-linux' | |
| - os: 'ubuntu-24.04-arm' | |
| label: 'linux-arm64' | |
| filename: 'simplelocalize-cli' | |
| downloadFilename: 'simplelocalize-cli-linux-arm64' | |
| - os: 'macos-13' | |
| label: 'mac' | |
| filename: 'simplelocalize-cli' | |
| downloadFilename: 'simplelocalize-cli-mac' | |
| - os: 'macos-14' | |
| label: 'mac-arm64' | |
| filename: 'simplelocalize-cli' | |
| downloadFilename: 'simplelocalize-cli-mac-arm64' | |
| - os: 'windows-latest' | |
| label: 'windows' | |
| filename: 'simplelocalize-cli.exe' | |
| downloadFilename: 'simplelocalize-cli-windows.exe' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: "Checkout" | |
| - name: "Print architecture" | |
| run: uname -m | |
| if: startsWith(matrix.os, 'macos') | |
| - uses: graalvm/setup-graalvm@v1 | |
| name: "Install GraalVM" | |
| with: | |
| java-version: '21' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "Build executable" | |
| run: mvn -DskipTests -Pnative clean package | |
| - name: "Test executable" | |
| run: ./target/${{ matrix.filename }} --version | |
| - name: "Rename executable" | |
| run: mv ./target/${{ matrix.filename }} ./target/${{ matrix.downloadFilename }} | |
| - name: "Upload artifact" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: simplelocalize-cli-${{ matrix.label }} | |
| path: ./target/${{ matrix.downloadFilename }} | |
| - name: 'Upload Executable to Release' | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: './target/${{ matrix.downloadFilename }}' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |