Skip to content

chore(deps): update dependency @types/node to v20.11.20 (#295) #177

chore(deps): update dependency @types/node to v20.11.20 (#295)

chore(deps): update dependency @types/node to v20.11.20 (#295) #177

Workflow file for this run

name: Release
on:
push:
branches:
- master
workflow_dispatch:
jobs:
draft_release:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.release-drafter.outputs.tag_name }}
steps:
# Get next version
- uses: release-drafter/release-drafter@v6
id: release-drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
runs-on: ubuntu-latest
environment:
name: prod
url: https://www.npmjs.com/package/junit2json
needs: draft_release
if: github.event_name == 'workflow_dispatch'
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: earthly/actions-setup@v1.0.10
with:
version: latest
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
ref: master
# Use GitHub App for bypassing ruleset guard when git push by npm publish
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BYPASS_APP_ID }}
private-key: ${{ secrets.BYPASS_APP_PRIVATE_KEY }}
# npm publish and push updated package.json
- name: Publish
run: |
npm run release -- --VERSION=$VERSION
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
# Publish github releases. Also tag will be created.
- uses: release-drafter/release-drafter@v6
with:
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}