Skip to content

Commit

Permalink
Overhaul Publish Action
Browse files Browse the repository at this point in the history
Add friendly names to all steps.
  • Loading branch information
elliot-huffman committed Jul 26, 2023
1 parent a35eb38 commit b9cfea1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 15 deletions.
54 changes: 39 additions & 15 deletions .github/workflows/NPM-Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,55 @@ on:
types: [released]

jobs:
build-test:
build-validate:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Download Source Files
uses: actions/checkout@v3

- name: Setup Node.JS Runtime
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm run-script build
- run: npm run-script test
- run: npm run-script lint

publish-npm:
needs: build-test
- name: Install All Dependencies
run: npm ci

- name: Build Project
run: npm run-script build

- name: Runt Unit Tests
run: npm run-script test

- name: Run Lint Tests
run: npm run-script lint

publish-package:
needs: build-validate
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Download Source Files
uses: actions/checkout@v3

- name: Set up Node.JS Runtime
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
scope: moot
- run: npm ci
- run: npm run-script build
- run: npm ci --omit=dev
- run: npm publish --access public

- name: Clean Install All Dependiencies
run: npm ci

- name: Build Project
run: npm run-script build

- name: Clear All But Runtime Dependincies
run: npm ci --omit=dev

- name: Upload Package to NPM Registry
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH}}
3 changes: 3 additions & 0 deletions ObjectID-Converter.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"cSpell.words": [
"Entra"
],
"cSpell.enableFiletypes": [
"github-actions-workflow"
],
},
"extensions": {
"recommendations": [
Expand Down

0 comments on commit b9cfea1

Please sign in to comment.