Merge pull request #25 from mindfiredigital/feature/modify-package-ex… #13
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: Deployment Workflow | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
name: "@mindfiredigital/react-text-igniter" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: read | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: "Install dependencies" | |
run: npm install | |
- name: "Build application" | |
run: npm run build | |
- name: "Restore changes in json" | |
run: | | |
git restore package-lock.json | |
- name: "Set Git user name and email" | |
run: | | |
git config --local user.email "github-actions@github.com" | |
git config --local user.name "GitHub Actions" | |
create-github-release: | |
name: Create Github release document and publish to node | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Semantic Release and npm release | |
run: | | |
npm ci | |
npx semantic-release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |