💚 Fix auto release actions
This commit is contained in:
11
.github/workflows/auto-create-release.yml
vendored
11
.github/workflows/auto-create-release.yml
vendored
@ -12,15 +12,22 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Extract body from changelog
|
||||
id: extract
|
||||
run: |
|
||||
NEW_VERSION=$(echo '${{ github.ref }}' | sed 's/refs\/tags\/v//')
|
||||
echo $NEW_VERSION
|
||||
RELEASE_BODY=$(sed -n -e "/## ${NEW_VERSION}/,/<a/ p" ./CHANGELOG.md | sed -e '2d;$d')
|
||||
echo "::set-output name=body::${RELEASE_BODY}"
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NEW_VERSION: ${{ github.ref }} | sed 's/v//'
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: sed -n -e '/## ${{NEW_VERSION}}/,/<a/ p' ./CHANGELOG.md | sed -e '1d;$d'
|
||||
body: |
|
||||
${{ steps.extract.outputs.body }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
21
.github/workflows/auto-create-tags.yml
vendored
21
.github/workflows/auto-create-tags.yml
vendored
@ -12,19 +12,18 @@ jobs:
|
||||
GITHUB_TOKEN: '${{ secrets.PERSONAL_TOKEN }}'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: Klemensas/action-autotag@stable
|
||||
- name: 'Create main tag'
|
||||
id: 'main'
|
||||
uses: Klemensas/action-autotag@stable
|
||||
with:
|
||||
tag_prefix: 'v'
|
||||
- uses: Klemensas/action-autotag@stable
|
||||
|
||||
- name: 'Create latest tag'
|
||||
if: ${{ contains(steps.main.outputs.tagname, 'v') }}
|
||||
uses: EndBug/latest-tag@latest
|
||||
|
||||
- name: 'Create typebot-js tag'
|
||||
uses: Klemensas/action-autotag@stable
|
||||
with:
|
||||
package_root: '/packages/typebot-js'
|
||||
tag_prefix: 'js-lib-v'
|
||||
create-latest-tag:
|
||||
needs: create-tag
|
||||
if: ${{ startsWith(needs.create-tag.outputs.tagname, 'v') }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.PERSONAL_TOKEN }}'
|
||||
steps:
|
||||
- name: Run latest-tag
|
||||
uses: EndBug/latest-tag@latest
|
||||
|
Reference in New Issue
Block a user