Skip to content

Commit

Permalink
💚 Fix auto release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Oct 17, 2022
1 parent c7370e3 commit f437ad6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/auto-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 10 additions & 11 deletions .github/workflows/auto-create-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f437ad6

Please sign in to comment.