Rewrite 12 detectors (Go/C#/Rust/Kotlin/Scala/C++) from regex to ANTL… #8
Workflow file for this run
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: Beta Release (Java) | |
| on: | |
| push: | |
| branches: [java] | |
| paths: ['src/**', 'pom.xml'] | |
| workflow_dispatch: | |
| jobs: | |
| beta: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| cache: 'maven' | |
| server-id: central | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| - name: Determine beta version | |
| id: version | |
| run: | | |
| LATEST_BETA=$(git tag -l 'v0.0.1-beta.*' | sort -V | tail -1) | |
| if [ -z "$LATEST_BETA" ]; then | |
| NEXT_NUM=0 | |
| else | |
| CURRENT_NUM=$(echo "$LATEST_BETA" | grep -oP 'beta\.\K[0-9]+') | |
| NEXT_NUM=$((CURRENT_NUM + 1)) | |
| fi | |
| VERSION="0.0.1-beta.${NEXT_NUM}" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "tag=v$VERSION" >> $GITHUB_OUTPUT | |
| echo "Next beta version: $VERSION" | |
| - name: Set version in pom.xml | |
| env: | |
| BETA_VERSION: ${{ steps.version.outputs.version }} | |
| run: mvn versions:set -DnewVersion="$BETA_VERSION" -B | |
| - name: Build and test | |
| run: mvn clean verify -B | |
| - name: Deploy to Maven Central | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.OSS_NEXUS_USER }} | |
| MAVEN_PASSWORD: ${{ secrets.OSS_NEXUS_PASS }} | |
| run: mvn deploy -DskipTests -B | |
| - name: Create git tag | |
| env: | |
| BETA_TAG: ${{ steps.version.outputs.tag }} | |
| BETA_VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "$BETA_TAG" -m "Beta release $BETA_VERSION" | |
| git push origin "$BETA_TAG" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: "Beta ${{ steps.version.outputs.version }}" | |
| prerelease: true | |
| generate_release_notes: true | |
| files: target/code-iq-*.jar |