Skip to content

Merge pull request #27 from githubschool/dependabot/npm_and_yarn/npm-… #22

Merge pull request #27 from githubschool/dependabot/npm_and_yarn/npm-…

Merge pull request #27 from githubschool/dependabot/npm_and_yarn/npm-… #22

# When a PR is merged, or when run manually, this workflow will build and
# package the GitHub Pages artifacts.
name: Continuous Delivery
on:
push:
branches:
- main
workflow_dispatch:
permissions:
actions: read
contents: write
id-token: write
packages: write
security-events: write
jobs:
cd:
name: Release Node.js Project
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install Dependencies
id: install
run: npm install
- name: Package
id: package
run: npm run package
- name: Upload Artifact
id: upload-artifact
uses: actions/upload-pages-artifact@v3
with:
path: .
- name: Tag
id: tag
uses: issue-ops/semver@v2
with:
manifest-path: package.json
workspace: ${{ github.workspace }}
ref: main
- name: Create Release
id: release
uses: issue-ops/releaser@v2
with:
tag: v${{ steps.tag.outputs.version }}