Skip to content

Commit

Permalink
ci: migrates from hub to gh CLI #124
Browse files Browse the repository at this point in the history
GitHub Actions has replaced hub CLI with gh CLI, breaking the artifact
publishing step.
  • Loading branch information
jshor committed Nov 22, 2023
1 parent 9ea111d commit 05729b0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Merge to master
name: Merge to main

on:
push:
branches:
- master
- main
release:
types: [created]

Expand All @@ -18,13 +18,15 @@ jobs:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
strategy:
matrix:
os: [windows-2019, macos-latest, ubuntu-latest]
os: [windows-latest, macos-latest, ubuntu-latest]
node-version: [16, 18, 20]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Python setup tools
run: pip install setuptools
- name: Set git credentials
run: |
git config --global user.email ${{ env.GIT_USER }}
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
with:
persist-credentials: false
- name: Pull latest
run: git pull origin master
run: git pull origin main
- name: Install Vuepress
run: yarn add vuepress@next -D
- name: Build documentation
Expand Down Expand Up @@ -106,10 +108,10 @@ jobs:
set -x
assets=()
for asset in ./build/stage/**/*; do
assets+=("-a" "$asset")
assets+=("$asset")
done
RELEASE_VERSION=$(echo $(ls build/stage| head -1))
hub release create "${assets[@]}" -m "v$RELEASE_VERSION" "$RELEASE_VERSION"
gh release create -t "v$RELEASE_VERSION" "$RELEASE_VERSION" "${assets[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -119,15 +121,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Pull latest
run: git pull origin master
run: git pull origin main
- name: Download js bundle
uses: actions/download-artifact@v2
with:
name: js-bundle
path: dist
- uses: actions/setup-node@v1
with:
node-version: 14
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pull request
on:
pull_request:
branches:
- master
- main
release:
types: [created]

Expand All @@ -13,7 +13,7 @@ jobs:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
strategy:
matrix:
os: [windows-2019, ubuntu-latest, macos-latest]
os: [windows-latest, macos-latest, ubuntu-latest]
# list only the earliest and latest node versions supported
# this makes PR builds more efficient
node-version: [16, 20]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<a href="https://app.codecov.io/gh/jshor/symbology"><img
src="https://img.shields.io/codecov/c/gh/jshor/symbology?style=for-the-badge"
alt="Code coverage"
/></a> <a href="https://github.com/jshor/symbology/actions?query=workflow%3A%22Merge+to+master%22"><img
src="https://img.shields.io/github/workflow/status/jshor/symbology/Merge%20to%20master?style=for-the-badge"
alt=""
/></a> <a href="https://github.com/jshor/symbology/actions/workflows/merge.yml"><img
src="https://img.shields.io/github/actions/workflow/status/jshor/symbology/merge.yml?branch=main&style=for-the-badge"
alt="Build status"
/></a> <a href="https://npmjs.com/package/symbology"><img
src="http://img.shields.io/npm/v/symbology.svg?style=for-the-badge"
alt="npm version"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"node": ">=14.0.0 <21.0.0"
},
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.10",
"@mapbox/node-pre-gyp": "^1.0.11",
"nan": "^2.14.2",
"node-fetch": "2",
"pngjs": "^6.0.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -778,10 +778,10 @@
"@jridgewell/resolve-uri" "3.1.0"
"@jridgewell/sourcemap-codec" "1.4.14"

"@mapbox/node-pre-gyp@^1.0.10":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz#8e6735ccebbb1581e5a7e652244cadc8a844d03c"
integrity sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==
"@mapbox/node-pre-gyp@^1.0.11":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa"
integrity sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==
dependencies:
detect-libc "^2.0.0"
https-proxy-agent "^5.0.0"
Expand Down

0 comments on commit 05729b0

Please sign in to comment.