Skip to content

Prepublish for release test #6

Prepublish for release test

Prepublish for release test #6

Workflow file for this run

name: Prepublish for release test
on:
push:
branches:
- publishing_from_local
workflow_dispatch:
jobs:
prerelease:
runs-on: ubuntu-latest
environment:
name: dev
url: https://www.npmjs.com/package/junit2json
permissions:
contents: write
id-token: write
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- uses: earthly/actions-setup@v1.0.13
with:
version: latest
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
# npm publish and push updated package.json
- name: PrePublish
run: |
npm run release:prepublish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Commit and push changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
git add package*.json
git commit -m "debug: npm run release:prepublish"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}