-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move Rust and Go SDKs to their own repos (#2289)
* move Rust and Go SDKs to their own repos These SDKs and their examples have moved to https://github.com/fermyon/spin-rust-sdk and https://github.com/fermyon/spin-go-sdk, respectively. The plan is to begin releasing them on their own cadence, independent of Spin releases. This will allow us to make breaking changes in semver-compatible major releases without tying such releases to a Spin major release, e.g. to target WASI 0.2.0. Note that I've update the integration tests which use the Rust SDK to use the latest stable release (2.2.0) instead of a path-based dependency. Alternatively, we could point it at the `main` branch of the `spin-rust-sdk` Git repo, but that will require close coordination once we start making breaking changes to the API in that repo. We may also want to move the Rust and Go templates to the new repos at some point. I've left them where they are for the time being. Finally, I've removed the SDK-specific bits from release-process.md and the GitHub workflows. We'll need to move those things to their respective SDK repos. Reproducing the automated Go SDK tagging that feeds into the templates may require moving at least the Go templates as noted above. Signed-off-by: Joel Dice <[email protected]> * restore accidentally-removed lines from release-process.md Signed-off-by: Joel Dice <[email protected]> * update SDK examples links to point to `stable` branches We'll update the `stable` branch of the applicable repo each time we make a new stable release of any of the SDKs so that these links always point to the examples for the latest stable release rather than `main`. Signed-off-by: Joel Dice <[email protected]> * re-add (updated version of) `push-templates-tag` to release.yml Unlike the original version, this one does not depend on the Go SDK automation and instead derives the template tag name from the Spin version tag name. Signed-off-by: Joel Dice <[email protected]> * re-add `build-and-sign` as dependency of `push-templates-tag` This ensures that we don't tag a broken build. Signed-off-by: Joel Dice <[email protected]> --------- Signed-off-by: Joel Dice <[email protected]>
- Loading branch information
Showing
266 changed files
with
57 additions
and
22,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Check tags for templates and sdk | ||
name: Check tags for templates | ||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,84 +254,17 @@ jobs: | |
--title ${{ github.ref_name }} \ | ||
--generate-notes ${{ env.PRERELEASE }} | ||
create-go-sdk-tag: | ||
name: create tag sdk/go/v* | ||
runs-on: ubuntu-latest | ||
needs: build-and-sign | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set the tag to sdk/go/v* | ||
shell: bash | ||
run: echo "GO_SDK_TAG=sdk/go/${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
|
||
- name: Tag sdk/go/v* and push it | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git tag ${{ env.GO_SDK_TAG }} | ||
git push origin ${{ env.GO_SDK_TAG }} | ||
create-template-sdk-update-pr: | ||
name: Create PR with template SDK updates | ||
runs-on: ubuntu-latest | ||
needs: create-go-sdk-tag | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set the spin tag | ||
shell: bash | ||
run: | | ||
echo "SPIN_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
- name: Set the PR base branch | ||
shell: bash | ||
run: | | ||
IFS=. read -r major minor patch <<< "${{ env.SPIN_TAG }}" | ||
echo "RELEASE_BRANCH=$major.$minor" >> $GITHUB_ENV | ||
- name: Change sdk version | ||
shell: bash | ||
run: | | ||
cd templates | ||
SDK_VERSION=${{ env.SPIN_TAG }} make | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
commit-message: "feat(templates): update sdk to ${{ env.SPIN_TAG }}" | ||
title: "feat(templates): update sdk to ${{ env.SPIN_TAG }}" | ||
body: Update the SDK version used by the templates | ||
branch: update-sdk-${{ env.SPIN_TAG }} | ||
base: ${{ env.RELEASE_BRANCH }} | ||
delete-branch: true | ||
committer: fermybot <[email protected]> | ||
author: fermybot <[email protected]> | ||
signoff: true | ||
|
||
# This will run when the PR above is approved and merged into main via a merge commit | ||
push-templates-tag: | ||
runs-on: ubuntu-latest | ||
needs: build-and-sign | ||
if: github.event.commits[0].author.name == 'fermybot' && contains(github.event.commits[0].message, 'update sdk') | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set the tag to spin/templates/v* | ||
shell: bash | ||
run: | | ||
spin_tag=$(echo "${{ github.event.commits[0].message }}" | grep -Eo v[0-9.]+) | ||
spin_tag=$(echo "${{ github.ref }}" | grep -Eo "refs/tags/v[0-9.]+") | ||
IFS=. read -r major minor patch <<< "${spin_tag}" | ||
echo "TEMPLATE_TAG=spin/templates/$major.$minor" >> $GITHUB_ENV | ||
|
@@ -431,23 +364,3 @@ jobs: | |
with: | ||
name: spin | ||
path: _dist/spin-${{ env.RELEASE_VERSION }}-static-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz | ||
|
||
crates: | ||
name: Publish to crates.io | ||
runs-on: ubuntu-latest | ||
needs: build-and-sign | ||
if: | | ||
startsWith(github.ref, 'refs/tags/v') && | ||
github.repository_owner == 'fermyon' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Publish spin-macro to crates.io | ||
working-directory: ./sdk/rust/macro | ||
run: | | ||
cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
- name: Publish spin-sdk to crates.io | ||
working-directory: ./sdk/rust | ||
run: | | ||
cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.