Merge pull request #519 from gofiber/dependabot/github_actions/releas… #376
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 Drafter (All) | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Generate filters | |
| id: filter-setup | |
| run: | | |
| # Add filter for core package (root directory files) | |
| filters="core: [\"*.go\", \"*.md\", \"go.mod\", \"go.sum\"]" | |
| filters+=$'\n' | |
| # Add filters for subdirectories | |
| filters+=$(find . -maxdepth 1 -type d ! -path ./.git ! -path . -exec basename {} \; | grep -v '^\.' | awk '{printf "%s: \"%s/**\"\n", $1, $1}') | |
| echo "filters<<EOF" >> $GITHUB_OUTPUT | |
| echo "$filters" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Filter changes | |
| id: filter | |
| uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4 | |
| with: | |
| filters: ${{ steps.filter-setup.outputs.filters }} | |
| outputs: | |
| packages: ${{ steps.filter.outputs.changes || '[]' }} | |
| release-drafter: | |
| needs: changes | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: needs.changes.outputs.packages != '[]' | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| strategy: | |
| matrix: | |
| package: ${{ fromJSON(needs.changes.outputs.packages || '[]') }} | |
| steps: | |
| - name: Checkout shared config | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| repository: gofiber/.github | |
| sparse-checkout: .github/release-drafter-module.yml | |
| sparse-checkout-cone-mode: false | |
| - name: Generate config from shared template | |
| run: | | |
| sed "s|{{MODULE}}|${{ matrix.package }}|g" \ | |
| .github/release-drafter-module.yml > .github/release-drafter-parsed.yml | |
| - name: Run release drafter | |
| uses: release-drafter/release-drafter@eada3c96a64734dd381cfbda23511034e328ddb0 # v7 | |
| with: | |
| config-name: file:release-drafter-parsed.yml |