ci: try to fix ci #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 Please | |
| on: | |
| push: | |
| branches: ["main"] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| major: ${{ steps.release.outputs.major }} | |
| minor: ${{ steps.release.outputs.minor }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - name: Release Please | |
| uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f | |
| id: release | |
| with: | |
| config-file: .github/release-please.json | |
| manifest-file: .github/manifest.json | |
| tag: | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Tag major and minor versions | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" | |
| git tag -d v${{ needs.release-please.outputs.major }} || true | |
| git tag -d v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} || true | |
| git push origin :v${{ needs.release-please.outputs.major }} || true | |
| git push origin :v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} || true | |
| git tag -a v${{ needs.release-please.outputs.major }} -m "Release v${{ needs.release-please.outputs.major }}" | |
| git tag -a v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} -m "Release v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}" | |
| git push origin v${{ needs.release-please.outputs.major }} | |
| git push origin v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} | |
| release: | |
| name: Build and Release | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Install gpac and GStreamer | |
| uses: ./.github/actions/deps | |
| - name: Build | |
| id: build | |
| shell: bash | |
| run: | | |
| cmake -B build | |
| cmake --build build -j --target release_package | |
| echo "artifact=$(ls build/*.deb)" >> $GITHUB_OUTPUT | |
| - name: Upload Release Artifact | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${{ steps.build.outputs.artifact }} --clobber |