diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4888766..7baef5da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,12 @@ on: branches: [ "develop" ] jobs: Build: + if: github.repository == 'CollaborativeStateMachines/Cirrina' + name: Build and Test runs-on: ubuntu-latest permissions: contents: read + checks: write pull-requests: write steps: - name: Check out the repo @@ -31,14 +34,4 @@ jobs: run: ./gradlew build - name: Test using Gradle - run: ./gradlew test - - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 - with: - commit: ${{github.event.workflow_run.head_sha}} - report_paths: 'build/test-results/test/TEST-*.xml' - fail_on_failure: true - require_tests: true - include_passed: true - detailed_summary: true \ No newline at end of file + run: ./gradlew test \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 11e799d9..10749697 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,9 +1,14 @@ name: Publish Docker image on: release: - types: [ published ] + types: [published] + push: + branches: + - master + - develop jobs: push_to_registry: + if: github.repository == 'CollaborativeStateMachines/Cirrina' name: Push Docker image to Docker Hub runs-on: ubuntu-latest permissions: @@ -26,13 +31,22 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: marlonetheredgeuibk/cirrina + tags: | + type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }} + type=raw,value=stable,enable=${{ github.event_name == 'release' }} + + type=raw,value=nightly,enable=${{ github.ref == 'refs/heads/master' }} + type=sha,enable=${{ github.ref == 'refs/heads/master' }} + + type=raw,value=unstable,enable=${{ github.ref == 'refs/heads/develop' }} + type=sha,enable=${{ github.ref == 'refs/heads/develop' }} - name: Build and push Docker image id: push uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 with: context: . - file: ./Dockerfile + file: ./Dockerfile.build push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..3382b08a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,50 @@ +name: Publish Artifacts +on: + release: + types: [published] + push: + branches: + - develop + - master +jobs: + Publish: + if: github.repository == 'CollaborativeStateMachines/Cirrina' + name: Publish Artifacts to GitHub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup GraalVM + uses: graalvm/setup-graalvm@v1 + with: + java-version: '21' + distribution: 'graalvm' + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Protoc + uses: arduino/setup-protoc@v3 + + - name: Build + run: ./gradlew build + + - name: Build distribution ZIP + if: github.event_name == 'release' + run: ./gradlew distZip + + - name: Upload unstable/nightly Pkl packages + if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' + uses: actions/upload-artifact@v4 + with: + path: build/generated/pkl/packages/csm/* + + - name: Upload release artifacts to GitHub Release + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: | + build/generated/pkl/packages/csm/* + build/distributions/*.zip + ATTRIBUTIONS.md + LICENSE + token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.gitignore b/.gitignore index e17dda9e..ba61a2de 100644 --- a/.gitignore +++ b/.gitignore @@ -179,9 +179,12 @@ fabric.properties # End of https://www.toptal.com/developers/gitignore/api/intellij +/bin + # PlantUML *.puml /package.json /package-lock.json /node_modules/ +/.idea/material_theme_project_new.xml diff --git a/.idea/Cirrina.iml b/.idea/Cirrina.iml new file mode 100644 index 00000000..d6ebd480 --- /dev/null +++ b/.idea/Cirrina.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 13845921..da0aae87 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -37,7 +37,16 @@ + + + @@ -49,6 +58,7 @@