chore(deps): update dependency conventional-changelog-conventionalcom… #104
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: Release | |
| "on": | |
| push: | |
| branches: | |
| - main | |
| - next | |
| - beta | |
| - "*.x" | |
| permissions: | |
| contents: read # for checkout | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # to be able to publish a GitHub release | |
| issues: write # to be able to comment on released issues | |
| pull-requests: write # to be able to comment on released pull requests | |
| id-token: write # to enable use of OIDC for npm provenance | |
| outputs: | |
| release_version: ${{ steps.get_version.outputs.release_version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "lts/*" | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 24 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Install dependencies | |
| run: npm clean-install | |
| - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | |
| run: npm audit signatures | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| ONELITEFEATHER_MAVEN_USERNAME: ${{ secrets.ONELITEFEATHER_MAVEN_USERNAME }} | |
| ONELITEFEATHER_MAVEN_PASSWORD: ${{ secrets.ONELITEFEATHER_MAVEN_PASSWORD }} | |
| run: npx semantic-release | |
| - name: Get release version | |
| id: get_version | |
| run: | | |
| if [ -f version.txt ]; then | |
| VERSION=$(cat version.txt) | |
| echo "release_version=$VERSION" >> $GITHUB_OUTPUT | |
| fi | |
| docker: | |
| name: Build Docker Artifacts | |
| runs-on: ubuntu-latest | |
| needs: release | |
| if: needs.release.outputs.release_version != '' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v5 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 24 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Build Docker Artifacts | |
| run: ./gradlew jar optimizedBuildLayers optimizedDockerfile -Pversion=${{ needs.release.outputs.release_version }} | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ${{ secrets.HARBOR_REGISTRY }}/otis/otis | |
| tags: | | |
| type=semver,pattern={{version}},value=${{ needs.release.outputs.release_version }} | |
| type=semver,pattern={{major}}.{{minor}},value=${{ needs.release.outputs.release_version }} | |
| type=semver,pattern={{major}},value=${{ needs.release.outputs.release_version }} | |
| type=sha | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to OneLiteFeather Harbor | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.HARBOR_USERNAME }} | |
| password: ${{ secrets.HARBOR_PASSWORD }} | |
| registry: ${{ secrets.HARBOR_REGISTRY }} | |
| - name: Build and push | |
| id: build-and-push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| context: ./backend/build/docker/optimized | |
| - name: Install Cosign | |
| uses: sigstore/cosign-installer@v4.0.0 | |
| - name: Sign image with a key | |
| run: | | |
| images="" | |
| for tag in ${TAGS}; do | |
| images+="${tag}@${DIGEST} " | |
| done | |
| cosign sign --yes --registry-username='${{ secrets.HARBOR_USERNAME }}' --registry-password='${{ secrets.HARBOR_PASSWORD }}' --key env://COSIGN_PRIVATE_KEY ${images} | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_KEY }} | |
| COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} |