-
Notifications
You must be signed in to change notification settings - Fork 179
43 lines (39 loc) · 1.36 KB
/
tag-releases.yaml
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
# A workflow to create github releases with changelogs from tags
name: 'Create github release for tag'
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
create-release:
runs-on: 'ubuntu-22.04'
name: 'Create changelogs and release'
steps:
# this could be improved by replacing this checkout with something like
# mkdir opentrons ; git init . ;
# git remote add origin https://github.com/opentrons/opentrons
# git fetch origin ${{ github.ref_name }}:${{ github.ref_name }}
# git checkout ${{ github.ref_name }}
# This would pull history for only the tag in question.
- uses: 'actions/checkout@v3'
with:
fetch-depth: 0
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
${{ github.workspace }}/.yarn-cache
key: js-${{ hashFiles('yarn.lock') }}
- name: 'setup-js'
run: |
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
yarn install
- name: 'create release'
run: |
node ./scripts/deploy/create-release.js ${{ github.token }} ${{ github.ref_name }} --deploy