|
| 1 | +name: Release falco_plugin |
| 2 | + |
| 3 | +on: |
| 4 | + # This workflow runs on every push to main to either open |
| 5 | + # a PR or publish the release. |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: read # Default token to read |
| 12 | + |
| 13 | +jobs: |
| 14 | + release-plz-release: |
| 15 | + if: ${{ github.repository_owner == 'edera-dev' }} |
| 16 | + name: Release-plz release |
| 17 | + runs-on: ubuntu-latest |
| 18 | + environment: release # Environment for trusted publishing |
| 19 | + permissions: |
| 20 | + contents: write # Needed to write release artifacts |
| 21 | + id-token: write # Needed for trusted publishing |
| 22 | + steps: |
| 23 | + - name: Harden the runner (Audit all outbound calls) |
| 24 | + uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 |
| 25 | + with: |
| 26 | + egress-policy: audit |
| 27 | + |
| 28 | + - name: Checkout repository |
| 29 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + persist-credentials: false |
| 33 | + |
| 34 | + - name: Install Rust toolchain |
| 35 | + uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # zizmor: ignore[stale-action-refs] -- pinned to stable branch |
| 36 | + |
| 37 | + - name: generate cultivator token |
| 38 | + uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 |
| 39 | + id: generate-token |
| 40 | + with: |
| 41 | + app-id: "${{ secrets.EDERA_CULTIVATION_APP_ID }}" |
| 42 | + private-key: "${{ secrets.EDERA_CULTIVATION_APP_PRIVATE_KEY }}" |
| 43 | + |
| 44 | + - name: Run release-plz |
| 45 | + uses: release-plz/action@d529f731ae3e89610ada96eda34e5c6ba3b12214 # v0.5 |
| 46 | + with: |
| 47 | + command: release |
| 48 | + env: |
| 49 | + GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" |
| 50 | + |
| 51 | + release-plz-pr: |
| 52 | + if: ${{ github.repository_owner == 'edera-dev' }} |
| 53 | + name: Release-plz PR |
| 54 | + runs-on: ubuntu-latest |
| 55 | + environment: release # Environment for trusted publishing |
| 56 | + permissions: |
| 57 | + contents: write # Needed to write release artifacts |
| 58 | + id-token: write # Needed for trusted publishing |
| 59 | + pull-requests: write # Needed to create pull requests |
| 60 | + concurrency: |
| 61 | + group: release-plz-${{ github.ref }} |
| 62 | + cancel-in-progress: false |
| 63 | + steps: |
| 64 | + - name: Harden the runner (Audit all outbound calls) |
| 65 | + uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 |
| 66 | + with: |
| 67 | + egress-policy: audit |
| 68 | + |
| 69 | + - name: Checkout repository |
| 70 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 71 | + with: |
| 72 | + fetch-depth: 0 |
| 73 | + persist-credentials: false |
| 74 | + |
| 75 | + - name: Install Rust toolchain |
| 76 | + uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # zizmor: ignore[stale-action-refs] -- pinned to stable branch |
| 77 | + |
| 78 | + - name: generate cultivator token |
| 79 | + uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 |
| 80 | + id: generate-token |
| 81 | + with: |
| 82 | + app-id: "${{ secrets.EDERA_CULTIVATION_APP_ID }}" |
| 83 | + private-key: "${{ secrets.EDERA_CULTIVATION_APP_PRIVATE_KEY }}" |
| 84 | + |
| 85 | + - name: Run release-plz |
| 86 | + uses: release-plz/action@d529f731ae3e89610ada96eda34e5c6ba3b12214 # v0.5 |
| 87 | + with: |
| 88 | + command: release-pr |
| 89 | + env: |
| 90 | + GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" |
0 commit comments