Skip to content

Add write permissions to contents in release.yml #15

Add write permissions to contents in release.yml

Add write permissions to contents in release.yml #15

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_call:
secrets:
NPM_TOKEN:
required: true
permissions:
contents: write
jobs:
release:
name: Release to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install Dependencies
run: npm i
- name: Build Project
run: npm run build
- name: Run Test Suite
run: npm run test
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Upload Code Coverage
uses: codecov/[email protected]