Merge pull request #43 from githubschool/dependabot/npm_and_yarn/jest… #29
This file contains hidden or 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
| # 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 }} |