2
0

👷 Add auto tag and release actions

This commit is contained in:
Baptiste Arnaud
2022-10-16 10:08:20 +02:00
parent 3dc3ab201d
commit f9a8e78904
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,26 @@
on:
push:
tags:
- 'v*'
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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'
draft: false
prerelease: false

30
.github/workflows/auto-create-tags.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Create Tag
on:
push:
branches:
- main
jobs:
create-tag:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: '${{ secrets.PERSONAL_TOKEN }}'
steps:
- uses: actions/checkout@v2
- uses: Klemensas/action-autotag@stable
with:
tag_prefix: 'v'
- 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