-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.21 KB
/
release.yml
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
name: Release Package
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@tree-company'
- name: Install dependencies
run: yarn install
- name: Parse tag
id: parse_tag
run: "echo ${{ github.ref }} | sed 's#^refs/tags/#::set-output name=version::#'"
- name: Publish
run: yarn workspace @tree-company/eslint-config publish && yarn workspace @tree-company/stylelint-config publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
id: create_release
uses: release-drafter/release-drafter@v6
with:
name: ${{ steps.parse_tag.outputs.version }}
tag: ${{ steps.parse_tag.outputs.version }}
version: ${{ steps.parse_tag.outputs.version }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}