Skip to content

Commit

Permalink
chore: publish main package
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias committed Jan 25, 2024
1 parent f2634eb commit 17a2cce
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 276 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"
registry-url: 'https://registry.npmjs.org'
- name: Install cargo get
run: cargo install cargo-get
- name: Prepare os/arch packages
Expand All @@ -151,16 +151,17 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}
path: "homestar-runtime/npm/${{ env.node_pkg }}/bin"
- name: Publish production
path: 'homestar-runtime/npm/${{ env.node_pkg }}/bin'
- name: Publish arch packages to production
if: github.event_name == 'release' && github.event.action == 'published'
run: |
cp homestar-runtime/README.md "homestar-runtime/npm/${{ env.node_pkg }}"
cd "homestar-runtime/npm/${{ env.node_pkg }}"
chmod +x bin/${{ matrix.bin }}
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish RC
- name: Publish arch packages RC
if: github.event_name == 'workflow_dispatch'
run: |
cp homestar-runtime/README.md "homestar-runtime/npm/${{ env.node_pkg }}"
Expand All @@ -170,6 +171,28 @@ jobs:
npm publish --access public --tag rc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish main package to production
if: github.event_name == 'release' && github.event.action == 'published'
run: |
cp homestar-runtime/README.md "homestar-runtime/npm/base"
cd homestar-runtime/npm
export node_version=$(cargo get workspace.package.version)
envsubst < package-json-base.tmpl > "base/package.json"
cd base
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish main package RC
if: github.event_name == 'workflow_dispatch'
run: |
cp homestar-runtime/README.md "homestar-runtime/npm/base"
cd homestar-runtime/npm
export node_version="$(cargo get workspace.package.version)-rc.$(date +%s)"
envsubst < package-json-base.tmpl > "base/package.json"
cd base
npm publish --access public --tag rc
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

build-packages:
needs: binary-builds
Expand Down Expand Up @@ -243,7 +266,7 @@ jobs:
(github.event_name == 'workflow_dispatch' && github.event.inputs.force-publish)
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
DOCKER_BUILDKIT: '1'
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

Expand Down
263 changes: 0 additions & 263 deletions homestar-runtime/npm/base/package-lock.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "homestar-runtime",
"version": "0.0.8",
"version": "${node_version}",
"description": "The IPVM reference implementation",
"author": "Hugo Dias <hugomrdias@gmail.com> (hugodias.me)",
"author": "Hugo Dias <hugomrdias@gmail.com>
(hugodias.me)",
"homepage": "https://github.com/ipvm-wg/homestar/tree/main/homestar-runtime",
"repository": {
"url": "ipvm-wg/homestar",
Expand All @@ -25,12 +26,12 @@
},
"license": "Apache-2.0",
"optionalDependencies": {
"homestar-darwin-arm64": "*",
"homestar-darwin-x64": "*",
"homestar-linux-arm64": "*",
"homestar-linux-x64": "*",
"homestar-windows-arm64": "*",
"homestar-windows-x64": "*"
"homestar-darwin-arm64": "${node_version}",
"homestar-darwin-x64": "${node_version}",
"homestar-linux-arm64": "${node_version}",
"homestar-linux-x64": "${node_version}",
"homestar-windows-arm64": "${node_version}",
"homestar-windows-x64": "${node_version}"
},
"dependencies": {
"execa": "^8.0.1"
Expand Down

0 comments on commit 17a2cce

Please sign in to comment.