Skip to content

Commit

Permalink
Update publish_package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jan 12, 2025
1 parent d6964d8 commit 50290ab
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:

steps:

-
-
name: Checkout
uses: actions/checkout@v4

-
-
name: Setup Node
uses: actions/setup-node@v4
with:
Expand All @@ -35,32 +35,37 @@ jobs:
# id: check
# uses: EndBug/version-check@v2

-
-
name: NPM Install
# if: steps.check.outputs.changed == 'true'
run: |
npm clean-install
# -
# -
# name: NPM Run Lint
# run: |
# npm run lint --if-present

-
-
name: Ensure dist directory exists
run: mkdir -p dist

-
name: NPM Run Test
run: |
npm run test --if-present
-
-
name: NPM Run Build
run: |
npm run build --if-present
-
-
name: Zip dist & node_modules
run: zip -9qry "build.zip" "./" -i "node_modules/*" -i "dist/*"

-
-
name: Upload build.zip
uses: actions/upload-artifact@v4
with:
Expand All @@ -82,17 +87,17 @@ jobs:

steps:

-
-
name: Checkout
uses: actions/checkout@master

-
-
name: Download build.zip
uses: actions/download-artifact@v4
with:
name: build.zip

-
-
name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -102,7 +107,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

-
-
name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -128,28 +133,28 @@ jobs:

steps:

-
-
name: Checkout
uses: actions/checkout@v4

-
-
name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org/

-
-
name: Download build.zip
uses: actions/download-artifact@v4
with:
name: build.zip

-
-
name: Unzip build.zip
run: unzip -q -o build.zip

-
-
name: Publish NPM
run: |
cd dist
Expand All @@ -176,28 +181,27 @@ jobs:

# steps:

# -
# -
# uses: actions/checkout@v4

# -
# -
# uses: actions/setup-node@v4
# with:
# node-version: '20.x'
# registry-url: https://npm.pkg.github.com/
# scope: '@stylescape'

# -
# -
# name: Download build.zip
# uses: actions/download-artifact@v4
# with:
# name: build.zip

# -
# -
# name: Unzip build.zip
# run: unzip -q -o build.zip

# -
# -
# run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 50290ab

Please # to comment.