-
Notifications
You must be signed in to change notification settings - Fork 8
wasmCloud provider couchbase releases #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1e108a2
23d6b80
5c36512
14754f1
900d3f0
035f42c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| name: provider-couchbase | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'provider-couchbase-v[0-9].[0-9]+.[0-9]+' | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/provider-couchbase.yml' | ||
| - 'providers/couchbase/**' | ||
|
|
||
| env: | ||
| working_directory: providers/couchbase | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| permissions: | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| platform: | ||
| - os: linux | ||
| arch: amd64 | ||
| bin: linux_amd64.bin | ||
| - os: linux | ||
| arch: arm64 | ||
| bin: linux_arm64.bin | ||
| - os: darwin | ||
| arch: amd64 | ||
| bin: darwin_amd64.bin | ||
| - os: darwin | ||
| arch: arm64 | ||
| bin: darwin_arm64.bin | ||
| - os: windows | ||
| arch: amd64 | ||
| bin: windows_amd64.exe | ||
|
|
||
| steps: | ||
| # Checkout the repository with submodules | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| # Set up Go environment | ||
| - name: Set up Go | ||
| uses: actions/setup-go@19bb51245e9c80abacb2e91cc42b33fa478b8639 # v4.2.1 | ||
| with: | ||
| go-version: '1.24' | ||
|
|
||
| # Install dependencies | ||
| - name: Install dependencies | ||
| working-directory: ${{ env.working_directory }} | ||
| run: go mod tidy | ||
|
|
||
| # Build Go binaries for multiple platforms | ||
| - name: Build binary ${{ matrix.platform.os }}_${{ matrix.platform.arch }} | ||
| env: | ||
| GOOS: ${{ matrix.platform.os }} | ||
| GOARCH: ${{ matrix.platform.arch }} | ||
| working-directory: ${{ env.working_directory }} | ||
| run: | | ||
| echo "Building for $GOOS/$GOARCH to ${{ matrix.platform.bin }}" | ||
| go build -o ${{ matrix.platform.bin }} | ||
| - name: Upload binary | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| with: | ||
| name: ${{ matrix.platform.os }}_${{ matrix.platform.arch }} | ||
| path: ${{ env.working_directory }}/${{ matrix.platform.bin }} | ||
|
|
||
| archive: | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| submodules: recursive | ||
| # Install wash | ||
| - uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2.49.49 | ||
| with: | ||
| tool: wash | ||
| - name: Install wit-bindgen-wrpc | ||
| run: | | ||
| curl -fLO https://github.com/bytecodealliance/wrpc/releases/download/v0.14.0/wit-bindgen-wrpc-x86_64-unknown-linux-musl | ||
| chmod +x wit-bindgen-wrpc-x86_64-unknown-linux-musl | ||
| sudo mv wit-bindgen-wrpc-x86_64-unknown-linux-musl /usr/local/bin/wit-bindgen-wrpc | ||
| - name: Download binary | ||
| uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | ||
| with: | ||
| path: ${{ env.working_directory }}/bin | ||
| - name: Set version | ||
| if: github.event_name == 'pull_request' | ||
| run: echo "VERSION=canary" >> $GITHUB_ENV | ||
| - name: Set version | ||
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
| run: | | ||
| echo "VERSION=${GITHUB_REF_NAME#provider-couchbase-v}" >> $GITHUB_ENV | ||
| # Create provider archive | ||
| - name: Provider archive | ||
| working-directory: ${{ env.working_directory }} | ||
| env: | ||
| WASH_ISSUER_KEY: ${{ secrets.WASMCLOUD_ACCOUNT_OFFICIAL }} | ||
| WASH_SUBJECT_KEY: ${{ secrets.WASMCLOUD_COUCHBASE }} | ||
| run: | | ||
| wash par create \ | ||
| --binary "./bin/linux_amd64/linux_amd64.bin" \ | ||
| --compress \ | ||
| --destination "couchbase.par.gz" \ | ||
| --name "couchbase-provider" \ | ||
| --vendor "wasmcloud" \ | ||
| --wit-directory ./wit \ | ||
| --version "${VERSION}" | ||
| wash par insert \ | ||
| --arch aarch64-linux \ | ||
| --binary "./bin/linux_arm64/linux_arm64.bin" \ | ||
| couchbase.par.gz | ||
| wash par insert \ | ||
| --arch aarch64-macos \ | ||
| --binary "./bin/darwin_arm64/darwin_arm64.bin" \ | ||
| couchbase.par.gz | ||
| wash par insert \ | ||
| --arch x86_64-macos \ | ||
| --binary "./bin/darwin_amd64/darwin_amd64.bin" \ | ||
| couchbase.par.gz | ||
| wash par insert \ | ||
| --arch x86_64-windows \ | ||
| --binary "./bin/windows_amd64/windows_amd64.exe" \ | ||
| couchbase.par.gz | ||
| wash par inspect couchbase.par.gz | ||
| - name: Upload provider archive | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| with: | ||
| name: couchbase-provider-archive | ||
| path: ${{ env.working_directory }}/couchbase.par.gz | ||
|
Comment on lines
+137
to
+141
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this intended for debugging Canary builds since canaries aren't pushed to ghcr?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep that's right, just in case you want to download the par.gz from your specific PR action or something |
||
| - name: Push provider archive | ||
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
| env: | ||
| WASH_REG_USER: wasmCloud | ||
| WASH_REG_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| wash push ghcr.io/wasmcloud/contrib/providers/couchbase:$VERSION \ | ||
| ${{ env.working_directory }}/couchbase.par.gz \ | ||
|
brooksmtownsend marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: wit-wasmcloud-couchbase | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'wit-wasmcloud-couchbase-v[0-9].[0-9]+.[0-9]+' | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/wit-wasmcloud-couchbase.yml' | ||
| - 'providers/couchbase/wit' | ||
|
|
||
| env: | ||
| working_directory: providers/couchbase | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| submodules: recursive | ||
| - uses: taiki-e/install-action@be7c31b6745feec79dec5eb79178466c0670bb2d # v2.49.49 | ||
| with: | ||
| tool: wash | ||
| - uses: wasmcloud/wasmcloud/.github/actions/configure-wkg@4687e1a23f07f1b2b7cc917dad1dc3e7df5106cf | ||
| with: | ||
| oci-username: ${{ github.repository_owner }} | ||
| oci-password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build | ||
| working-directory: ${{ env.working_directory }} | ||
| run: wash wit build -f package.wasm | ||
| # From here on, only run for tagged releases | ||
| - name: Push version-tagged WebAssembly binary to GHCR | ||
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
| working-directory: ${{ env.working_directory }} | ||
| run: wash wit publish package.wasm | ||
| - name: Extract tag context | ||
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
| id: ctx | ||
| run: | | ||
| version=${GITHUB_REF_NAME#wit-wasmcloud-couchbase-v} | ||
| echo "version=${version}" >> "$GITHUB_OUTPUT" | ||
| echo "tarball=wit-wasmcloud-couchbase-${version}.tar.gz" >> "$GITHUB_OUTPUT" | ||
| echo "version is ${version}" | ||
| - name: Package tarball for release | ||
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
| working-directory: ${{ env.working_directory }} | ||
| run: | | ||
| tar -cvzf ${{ steps.ctx.outputs.tarball }} wit | ||
| - name: Release | ||
| if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | ||
| uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 | ||
| with: | ||
| files: ${{ steps.ctx.outputs.tarball }} | ||
| make_latest: 'false' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [submodule "providers/couchbase"] | ||
| path = providers/couchbase | ||
| url = https://github.com/couchbaselabs/wasmcloud-provider-couchbase |
Uh oh!
There was an error while loading. Please reload this page.