chore: Update version number #28
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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: | |
| - 'v*.*.*' | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: write # needed for creating releases | |
| packages: write # needed for creating releases | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java-version: [22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: 'temurin' | |
| cache: 'sbt' | |
| - name: Setup sbt | |
| uses: sbt/setup-sbt@v1 | |
| - name: Run tests | |
| run: sbt test | |
| - name: Build universal package | |
| run: sbt 'set version := "${{ github.ref_name }}"' Universal/packageBin | |
| - name: Get package path | |
| id: get_package | |
| run: | | |
| echo "PACKAGE_PATH=$(find target/universal -name 'supercoder-*.zip' -type f)" >> $GITHUB_ENV | |
| echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Create a Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ env.PACKAGE_PATH }} | |
| name: Release ${{ env.VERSION }} | |
| body: | | |
| ## SuperCoder Release ${{ env.VERSION }} | |
| ### Installation | |
| Download the zip file and extract it to your desired location. | |
| ### Running | |
| After extraction, you can run the application using: | |
| ```bash | |
| ./bin/supercoder | |
| ``` | |
| ### Changes | |
| See the commit history for detailed changes. | |
| draft: false | |
| prerelease: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: supercoder-package | |
| path: ${{ env.PACKAGE_PATH }} | |
| retention-days: 5 | |
| - name: Cleanup before cache | |
| run: | | |
| rm -rf "$HOME/.ivy2/local" || true | |
| find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true | |
| find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true | |
| find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true | |
| find $HOME/.sbt -name "*.lock" -delete || true |