Skip to content
Merged
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
File renamed without changes.
49 changes: 37 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release New Version
name: Release New SDK Version
on:
workflow_dispatch:
inputs:
version:
description: "The version to release"
description: "The version to release. Do not include the v prefix."
required: false
default: ""

Expand All @@ -12,11 +12,12 @@ concurrency:
cancel-in-progress: true

env:
SVU_VERSION: "3.3.3"
SVU_VERSION: "3.3.0"

permissions:
contents: write
id-token: write
packages: write

jobs:
build-with-latest-hapi-release:
Expand All @@ -38,6 +39,13 @@ jobs:
cache: "npm"
registry-url: "https://npm.pkg.github.com"

- name: Prevent Post-Install Scripts
run: |
npm config set ignore-scripts true

- name: Install Dependencies
run: npm install -g socket && npx socket npm ci

- name: Setup Copywrite
uses: hashicorp/[email protected]

Expand Down Expand Up @@ -74,17 +82,19 @@ jobs:

- name: Get svu
run: |
URL="https://github.com/caarlos0/svu/releases/download/v${SVU_VERSION}/svu_${SVU_VERSION}_linux_amd64.tar.gz"
wget --quiet $URL --output-document svu.tar.gz
tar -xzf svu.tar.gz
chmod +x svu
sudo mv svu /usr/local/bin/
tmpdir=$(mktemp -d)
URL="https://github.com/caarlos0/svu/releases/download/v${{ env.SVU_VERSION }}/svu_${{ env.SVU_VERSION }}_linux_amd64.tar.gz"
wget --quiet "$URL" --output-document "$tmpdir/svu.tar.gz"
tar -xzf "$tmpdir/svu.tar.gz" -C "$tmpdir"
sudo install "$tmpdir/svu" /usr/local/bin/
rm -rf "$tmpdir"
svu --version

- id: tag
name: Determine Version to Release
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
INPUT_VERSION="${{ github.event.inputs.version }}"

if [ -n "$INPUT_VERSION" ]; then
echo "Using provided version: $INPUT_VERSION"
VERSION="$INPUT_VERSION"
Expand Down Expand Up @@ -130,13 +140,28 @@ jobs:

- name: Set package version
if: steps.tag.outputs.SAME_VERSION != 'true'
run: npm version ${{ steps.tag.outputs.NPM_VERSION }} --no-git-tag-version
env:
NPM_VERSION: ${{ steps.tag.outputs.NPM_VERSION }}
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
if [ "$CURRENT_VERSION" = "$NPM_VERSION" ]; then
echo "package.json already at version $NPM_VERSION, skipping"
else
npm version "$NPM_VERSION" --no-git-tag-version
fi

- name: Publish to npm
if: steps.tag.outputs.SAME_VERSION != 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create GitHub Release
if: steps.tag.outputs.SAME_VERSION != 'true'
env:
GH_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}
VERSION: ${{ steps.tag.outputs.VERSION }}
run: gh release create "$VERSION" --generate-notes

- name: Commit reviewable diff
if: steps.tag.outputs.SAME_VERSION != 'true'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ yarn-error.log*

# Credentials
.netrc
.npmrc

# OS generated files
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
registry=https://registry.npmjs.org/
@spectrocloud:registry=https://npm.pkg.github.com
access=public
ignore-scripts=true
22 changes: 22 additions & 0 deletions api/palette-apis-spec-fixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2979,10 +2979,21 @@
],
"type": "string"
},
"hostResourceGroupArn": {
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
"type": "string"
},
"instanceType": {
"description": "instance type",
"type": "string"
},
"licenseConfigurationArns": {
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
"items": {
"type": "string"
},
"type": "array"
},
"rootDeviceSize": {
"description": "rootDeviceSize in GBs",
"format": "int64",
Expand Down Expand Up @@ -3045,6 +3056,10 @@
],
"type": "string"
},
"hostResourceGroupArn": {
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
"type": "string"
},
"instanceConfig": {
"$ref": "#/definitions/v1InstanceConfig"
},
Expand All @@ -3064,6 +3079,13 @@
},
"type": "array"
},
"licenseConfigurationArns": {
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
"items": {
"type": "string"
},
"type": "array"
},
"machinePoolProperties": {
"$ref": "#/definitions/v1MachinePoolProperties"
},
Expand Down
22 changes: 22 additions & 0 deletions api/palette-apis-spec-tagged.json
Original file line number Diff line number Diff line change
Expand Up @@ -2979,10 +2979,21 @@
],
"type": "string"
},
"hostResourceGroupArn": {
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
"type": "string"
},
"instanceType": {
"description": "instance type",
"type": "string"
},
"licenseConfigurationArns": {
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
"items": {
"type": "string"
},
"type": "array"
},
"rootDeviceSize": {
"description": "rootDeviceSize in GBs",
"format": "int64",
Expand Down Expand Up @@ -3045,6 +3056,10 @@
],
"type": "string"
},
"hostResourceGroupArn": {
"description": "ARN of AWS Host Resource Group for node placement on dedicated hosts",
"type": "string"
},
"instanceConfig": {
"$ref": "#/definitions/v1InstanceConfig"
},
Expand All @@ -3064,6 +3079,13 @@
},
"type": "array"
},
"licenseConfigurationArns": {
"description": "List of AWS License Configuration ARNs (required when hostResourceGroupArn is specified)",
"items": {
"type": "string"
},
"type": "array"
},
"machinePoolProperties": {
"$ref": "#/definitions/v1MachinePoolProperties"
},
Expand Down
2 changes: 1 addition & 1 deletion api/palette-apis-spec.json

Large diffs are not rendered by default.

Loading