-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.75 KB
/
release-or-version-pr.yml
File metadata and controls
50 lines (44 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release Or Version PR
on:
push:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
# Basic security: the release job can only be executed from this repo and from the main branch (not a remote thing)
if: ${{ github.repository == 'timelessco/strapi-ts-monorepo' &&
contains('refs/heads/main',github.ref)}}
name: Version and create changelog
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
# To run comparison we need more than the latest commit.
# @link https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0
- name: 📥 Prepare package manager
uses: ./.github/actions/prepare
# @link https://github.com/changesets/action
- name: 🦋 Create or Update Version
id: changesets
uses: changesets/action@v1
with:
cwd: ${{ github.workspace }}
title: "chore(release): 🎉 version packages"
# publish: yarn release
# Optional, might be used in conjunction with GITHUB_TOKEN to
# allow running the workflows on a Version package action.
# Be aware of security implications.
# setupGitUser: true
env:
# See https://github.com/changesets/action/issues/147
HOME: ${{ github.workspace }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Uncomment and add secrets to allow publishing
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish & Release
if: contains(github.event.head_commit.message, '🎉 version packages')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release