Skip to content

Commit

Permalink
chore: Improved actions workflows with Node LTS (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
imzedi authored Nov 6, 2024
1 parent 809e45e commit 43e455f
Show file tree
Hide file tree
Showing 6 changed files with 5,427 additions and 2,603 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/autotag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Create Tag on package.json update

on:
push:
branches:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: '${{ secrets.GH_AUTH_TOKEN }}'
fetch-depth: 0
- uses: butlerlogic/action-autotag@master
with:
GITHUB_TOKEN: "${{ secrets.GH_AUTH_TOKEN }}"
tag_prefix: "v"
- uses: actions/checkout@v4
with:
token: "${{ secrets.GH_AUTH_TOKEN }}"
fetch-depth: 0
- uses: butlerlogic/action-autotag@master
with:
GITHUB_TOKEN: "${{ secrets.GH_AUTH_TOKEN }}"
tag_prefix: "v"
25 changes: 13 additions & 12 deletions .github/workflows/npm-publish-pro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ name: Publish to NPM PRO
on:
push:
tags:
- '*'
- "*"

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 10.16.3
- name: Install NPM
run: npm ci --progress=false
- name: Set Gemfury Config
run: printf "@iconscout:registry=https://npm-proxy.fury.io/iconscout/\n//npm-proxy.fury.io/iconscout/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.FURY_AUTH_TOKEN }}
node-version: 22.11.0
registry-url: "https://npm-proxy.fury.io/iconscout/"
scope: "@iconscout"
- name: Download & Build Icons
run: npm i @iconscout/unicons@latest && npm run generate
run: |
npm ci --progress=false
npm i @iconscout/unicons@latest
npm run generate
- name: Publish to Gemfury
run: npm publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.FURY_AUTH_TOKEN }}
27 changes: 13 additions & 14 deletions .github/workflows/npm-publish-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@ name: Publish to NPM RC

on:
push:
# Sequence of patterns matched against refs/heads
branches:
- 'release-*'
branches:
- "release-*"

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'push'
uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v1
with:
node-version: 10.16.3
node-version: 22.11.0
registry-url: "https://registry.npmjs.org"
- name: Download & Build Icons
run: npm ci --progress=false && npm i @iconscout/unicons@latest && npm run generate
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_AUTH_TOKEN }}
title: Updated Icons
- name: Publish to NPM
uses: primer/[email protected]
run: |
VERSION=$(node -p "require('./package.json').version")
RC_VERSION="${VERSION}-rc.${GITHUB_SHA::8}"
npm version $RC_VERSION --no-git-tag-version
npm publish --tag rc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
13 changes: 7 additions & 6 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ name: Publish to NPM
on:
push:
tags:
- '*'
- "*"

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 10.16.3
node-version: 22.11.0
registry-url: "https://registry.npmjs.org"
- name: Download & Build Icons
run: npm ci --progress=false && npm i @iconscout/unicons@latest && npm run generate
- name: Publish to NPM
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc && npm publish
run: npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.11.0
Loading

0 comments on commit 43e455f

Please sign in to comment.