Skip to content

Commit

Permalink
build: test
Browse files Browse the repository at this point in the history
  • Loading branch information
oneWalker committed Nov 6, 2024
1 parent 19262b3 commit 37e7890
Showing 1 changed file with 45 additions and 40 deletions.
85 changes: 45 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,50 @@ name: Publish my node package
on:
push:
branches: [cur-publish, cur-publish-dev]

jobs:
publish:
runs-on: ubuntu-latest

steps:
# Checkout action repository
- name: Checkout action repository
uses: actions/checkout@v4
with:
repository: node-modules/github-actions
path: action_repo

# Checkout project repository
- name: Checkout project repository
uses: actions/checkout@v4
with:
path: main_repo
token: ${{ secrets.GIT_TOKEN }}

# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4

# Install action dependencies
- name: Install action dependencies
run: npm i --no-package-lock --no-fund --omit=dev
working-directory: action_repo/scripts/release

# Install dependencies
- name: Install dependencies
run: npm i --no-package-lock --no-fund

- name: Publish to npm
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Publish to github package registry
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.GIT_TOKEN }}
registry: "https://npm.pkg.github.com"
runs-on: ubuntu-latest

steps:
# Checkout action repository
- name: Checkout action repository
uses: actions/checkout@v4
with:
repository: node-modules/github-actions
path: action_repo

# Checkout project repository
- name: Checkout project repository
uses: actions/checkout@v4
with:
path: main_repo
token: ${{ secrets.GIT_TOKEN }}

# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14' # Specify the Node.js version

# Install action dependencies
- name: Install action dependencies
run: npm i --no-package-lock --no-fund --omit=dev
working-directory: action_repo/scripts/release

# Install project dependencies
- name: Install project dependencies
run: npm i --no-package-lock --no-fund

# Publish to npm
- name: Publish to npm
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}

# Publish to GitHub package registry
- name: Publish to GitHub package registry
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.GIT_TOKEN }}
registry: "https://npm.pkg.github.com"

0 comments on commit 37e7890

Please sign in to comment.