Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔄 synced file(s) with ventrata/octo-lint #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/check-version-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v2
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22.9.0

- name: Get PR version
- name: Get version in pull request
id: pr_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Checkout main branch
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0

- name: Get main version
id: main_version
- name: Get version in default branch
id: default_branch_version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Compare versions
run: |
if [ "${{ steps.pr_version.outputs.VERSION }}" != "${{ steps.main_version.outputs.VERSION }}" ]; then
if [ "${{ steps.pr_version.outputs.VERSION }}" != "${{ steps.default_branch_version.outputs.VERSION }}" ]; then
echo "Version changed: ${{ steps.pr_version.outputs.VERSION }}"
else
echo "Version did not change"
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,31 @@ on:
branches:
- master
- main
workflow_dispatch:
workflow_dispatch:

jobs:
publish-npm:
name: Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v4
with:
node-version: 20
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 22.9.0
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run build
- run: npm publish

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
Loading