chore(deps): update octokit monorepo (#1390) #897
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: Release | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
draft_release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
outputs: | |
tag_name: ${{ steps.release-drafter.outputs.tag_name }} | |
steps: | |
# Get next version | |
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0 | |
id: release-drafter | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: github.event_name == 'workflow_dispatch' | |
needs: draft_release | |
permissions: | |
contents: write | |
steps: | |
# Create version string from tag (v1.0.0 -> 1.0.0) | |
- name: Create version string | |
run: | | |
export TAG_NAME=${{ needs.draft_release.outputs.tag_name }} | |
echo "VERSION=${TAG_NAME:1}" >> $GITHUB_ENV | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: master | |
# Workaround for trigger 'push tag' event for build Docker workflow | |
# see: https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/4 | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- uses: actions/setup-node@v4 | |
- name: Setup git config | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
- name: Create git tag and push for triggering docker.yml workflow | |
run: | | |
npm version $VERSION | |
git push origin master | |
git push origin "v${VERSION}" | |
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # v6.0.0 | |
with: | |
publish: true | |
tag: v${{ env.VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |