tagged-release #189
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'tagged-release' | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
tagged-release: | |
name: 'Tagged Release' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install npm@latest | |
run: npm install --global npm@latest | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: run test | |
run: 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 }} |