8000 chore: wip manual-release workflow · raszi/typescript-eslint@8a9be34 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a9be34

Browse files
committed
chore: wip manual-release workflow
1 parent 00a2470 commit 8a9be34

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/manual-release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow is used on the rare occassion we need to manually cut a release.
2+
# It can be triggered via the Github UI or the Github API.
3+
4+
name: Manual publish to Github Releases and NPM
5+
6+
on:
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
# We need to fetch all tags and branches
16+
fetch-depth: 0
17+
18+
- name: Verify head of master hasn't changed
19+
run: |
20+
# We ensure that the latest commit on master is still the one we expected when
21+
# we started the release job, otherwise we exit
22+
if [ "$GITHUB_SHA" != "$(git rev-parse --verify HEAD)" ]; then
23+
echo "ERROR: The commit SHA at the HEAD of master has changed"
24+
echo "Expected: $GITHUB_SHA"
25+
echo "Actual: $(git rev-parse --verify HEAD)"
26+
exit 1;
27+
fi
28+
29+
- name: Get yarn cache directory path
30+
id: yarn-cache-dir-path
31+
run: echo "::set-output name=dir::$(yarn cache dir)"
32+
33+
- uses: actions/cache@v2
34+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
35+
with:
36+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
37+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-yarn-
40+
41+
- name: Install dependencies
42+
run: yarn --frozen-lockfile
43+
44+
- name: (WIP) Determine what version to release
45+
run: npx lerna version --loglevel=silly --conventional-commits --exact

0 commit comments

Comments
 (0)
0