fix(workflow): modifying permissions #20
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 docker-manager-library to npm | |
on: | |
push: | |
branches: | |
- "master" | |
permissions: | |
contents: write | |
issues: write | |
packages: write | |
actions: write | |
jobs: | |
release: | |
name: Release | |
runs-on: | |
labels: [self-hosted, ci] | |
container: | |
image: node:20-bullseye | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build library | |
run: pnpm build | |
- name: Add working directory to git as safe directory | |
run: | | |
git config --global --add safe.directory "${PWD}" | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: pnpm dlx semantic-release |