👷 Add auto tag and release actions
This commit is contained in:
26
.github/workflows/auto-create-release.yml
vendored
Normal file
26
.github/workflows/auto-create-release.yml
vendored
Normal 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
30
.github/workflows/auto-create-tags.yml
vendored
Normal 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
|
Reference in New Issue
Block a user