Skip to content

fix(deps): migrate a package manager to pnpm (#388) #21

fix(deps): migrate a package manager to pnpm (#388)

fix(deps): migrate a package manager to pnpm (#388) #21

Workflow file for this run

name: 'release'
on:
push:
branches:
- master
jobs:
build:
uses: ./.github/workflows/build.yml
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'latest'
if: ${{ steps.release.outputs.release_created }}
- uses: actions/download-artifact@v3
with:
name: dist
if: ${{ steps.release.outputs.release_created }}
- name: Publish to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
major_version: ${{ steps.release.outputs.major }}
full_version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
tag_name: ${{ steps.release.outputs.tag_name }}
run: |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit --allow-empty --message "Release v${full_version} at ${GITHUB_SHA}"
git tag -d v$major_version || true
git tag -d v$full_version || true
git tag -a v$major_version -m "Release v$full_version"
git tag -a v$full_version -m "Release v$full_version"
git push origin latest
git push origin v$major_version --force
git push origin v$full_version
git tag -a $tag_name $GITHUB_SHA -m "Release v$full_version"
git push origin $tag_name
if: ${{ steps.release.outputs.release_created }}