Merge pull request #175 from a5chin/renovate/lock-file-maintenance #32
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: | |
| - develop | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| develop: | |
| if: github.ref_name == 'develop' | |
| runs-on: ubuntu-latest | |
| environment: Develop | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Update Draft Release | |
| uses: release-drafter/release-drafter@v6 | |
| with: | |
| config-name: release-drafter.yml | |
| disable-autolabeler: true | |
| publish: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| production: | |
| if: github.ref_name == 'main' | |
| runs-on: ubuntu-latest | |
| environment: Production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Get PR Title for Version | |
| id: pr | |
| run: | | |
| PR_TITLE=$(gh pr list --search "${{ github.sha }}" --state merged --json title --jq '.[0].title') | |
| echo "TITLE=$PR_TITLE" >> "$GITHUB_OUTPUT" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish Release | |
| uses: release-drafter/release-drafter@v6 | |
| with: | |
| config-name: release-drafter.yml | |
| disable-autolabeler: true | |
| name: ${{ env.VERSION }} | |
| publish: true | |
| tag: ${{ env.VERSION }} | |
| version: ${{ env.VERSION }} | |
| env: | |
| VERSION: ${{ steps.pr.outputs.TITLE }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |