Refactor release.yml to remove 'closed' event type in pull_request tr… #55
This file contains 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 for Figma | |
on: | |
push: | |
branches: | |
- ui-color-palette-* | |
pull_request: | |
types: | |
- synchronize | |
branches: | |
- ui-color-palette-* | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Extract package version | |
id: extract_version | |
run: | | |
package_version=$(jq -r '.version' package.json) | |
echo "::set-output name=package_version::$package_version" | |
- name: Create release | |
id: create_release | |
if: github.event.pull_request.merged == true | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.extract_version.outputs.package_version }} | |
release_name: ${{ github.event.pull_request.title}} | |
body: | | |
## What's Changed | |
[Friendly release note](https://ui-color-palette.canny.io/changelog/${{ github.ref_name }})・[Full Changelog](https://github.com/inVoltag/figma-ui-color-palette/commits/${{ github.ref_name }}) |