Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
71 changes: 71 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: sw-serverless CLI release

# A tag cli-v<version> (cli-v10.2.0) publishes the sw-serverless command as self-contained
# binaries on a GitHub release: nothing needs .NET installed to run them.
on:
push:
tags: ["cli-v*"]
workflow_dispatch:
inputs:
version:
description: "Version to release, e.g. 10.2.0 (tagged cli-v<version>)"
required: true

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rid: [linux-x64, linux-arm64, linux-musl-x64, linux-musl-arm64, osx-x64, osx-arm64, win-x64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Version
id: version
run: |
v="${{ github.event.inputs.version }}"
[ -z "$v" ] && v="${GITHUB_REF_NAME#cli-v}"
echo "value=$v" >> "$GITHUB_OUTPUT"
- name: Publish
run: >
dotnet publish SW.Serverless.Installer -c Release -r ${{ matrix.rid }} --self-contained
-p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none
-p:Version=${{ steps.version.outputs.value }} -o out
- name: Package
run: |
mkdir -p dist
cp README.md LICENSE out/ 2>/dev/null || true
if [[ "${{ matrix.rid }}" == win-* ]]; then
(cd out && zip -q -r ../dist/sw-serverless-${{ matrix.rid }}.zip .)
else
tar -czf dist/sw-serverless-${{ matrix.rid }}.tar.gz -C out .
fi
- uses: actions/upload-artifact@v4
with:
name: sw-serverless-${{ matrix.rid }}
path: dist/*

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Checksums
run: cd dist && sha256sum * > SHA256SUMS && cat SHA256SUMS
- name: Release
env:
GH_TOKEN: ${{ github.token }}
run: |
v="${{ github.event.inputs.version }}"
[ -z "$v" ] && v="${GITHUB_REF_NAME#cli-v}"
gh release create "cli-v$v" dist/* --title "sw-serverless $v" --target "${{ github.sha }}" \
--notes "The sw-serverless command, self-contained for each platform. Install: curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.repository.default_branch }}/scripts/install-cli.sh | sh — or download the archive for your platform and check it against SHA256SUMS."
26 changes: 26 additions & 0 deletions .github/workflows/node-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node SDK

on:
push:
branches: [main]
paths: ["sdk/node/**", ".github/workflows/node-sdk.yml"]
pull_request:
paths: ["sdk/node/**", ".github/workflows/node-sdk.yml"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["22", "24"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Unit tests
working-directory: sdk/node
run: node --test
2 changes: 1 addition & 1 deletion .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
SW.Serverless.Sdk/SW.Serverless.Sdk.csproj
SW.Serverless.Tooling/SW.Serverless.Tooling.csproj
major-version: '10'
minor-version: '1'
minor-version: '2'
dotnet-version: '10.0.x'
run-tests: true
test-projects: '**/*UnitTests/*.csproj'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Test installer
run: dotnet test SW.Serverless.Installer.UnitTests/SW.Serverless.Installer.UnitTests.csproj -c Release --no-build

# Hosts on the published SimplyWorks.Serverless 10.0.x, older Bitween listings and adapters on
# Hosts on the published SimplyWorks.Serverless 10.0.x, older storage listings and adapters on
# the published SDK, against what this branch's installer and host write and read. Outside the
# *UnitTests glob the publish workflow uses, so it is run here explicitly.
- name: Test backward compatibility
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/python-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Python SDK

on:
push:
branches: [main]
paths: ["sdk/python/**", ".github/workflows/python-sdk.yml"]
pull_request:
paths: ["sdk/python/**", ".github/workflows/python-sdk.yml"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Unit tests
working-directory: sdk/python
run: PYTHONPATH=src python -m unittest discover -s tests -v
Loading
Loading