-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (39 loc) · 1.39 KB
/
tagged-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
42
43
name: 'tagged-release'
on:
push:
tags:
- 'v*'
jobs:
tagged-release:
name: 'Tagged Release'
runs-on: 'ubuntu-latest'
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: run test
run: |
npm ci
npx playwright install --with-deps
npm run test:all
- name: pack and set vars
id: vars
run: |
tagName="${GITHUB_REF#refs/*/}"
originalTarName="$(npm pack)"
packageNameWithoutFileExtension="${originalTarName%.tgz}"
tagNameWithoutV="${tagName##v}"
packageName="${packageNameWithoutFileExtension%-$tagNameWithoutV}"
newTarName="$packageName-$tagName.tgz"
mv "$originalTarName" "$newTarName"
echo ::set-output name=tarName::"$newTarName"
- uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
prerelease: false
files: |
${{ steps.vars.outputs.tarName }}