Skip to content

Commit

Permalink
update release/build
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat Jindal <[email protected]>
  • Loading branch information
rajatjindal committed Jan 23, 2024
1 parent 1243d8e commit cc713ea
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 52 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build
on:
push:
branches: [main]
pull_request:
branches: ["main"]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup TinyGo
uses: rajatjindal/setup-actions/[email protected]
id: setup
with:
version: "v0.27.0"
version: "v0.30.0"

- name: Install Spin canary
uses: engineerd/[email protected]
- name: Setup Spin
uses: fermyon/actions/spin/setup@v1
with:
name: "spin"
url: "https://github.com/fermyon/spin/releases/download/canary/spin-canary-linux-amd64.tar.gz"
pathInArchive: "spin"
version: "canary"

- name: Build application
shell: bash
Expand Down
64 changes: 21 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,30 @@ jobs:
name: Build and release assets
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Spin
uses: fermyon/actions/spin/setup@v1
with:
version: "canary"

- name: Install nodejs
uses: actions/setup-node@v3
- name: "Install TinyGo"
uses: rajatjindal/setup-actions/[email protected]
with:
node-version: 16
version: 'v0.30.0'

- name: "Build"
run: spin build

- name: Install NPM dependencies for explorer
shell: bash
- name: generate checksums
run: |
cd explorer
npm install -
sha256sum explorer/main.wasm > checksums-${{ env.RELEASE_VERSION }}.txt
- name: Install Spin canary
uses: engineerd/[email protected]
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: "spin"
url: "https://github.com/fermyon/spin/releases/download/canary/spin-canary-linux-amd64.tar.gz"
pathInArchive: "spin"

# Currently, the explorer is built with the dev branch of TinyGo.
# Until there is a release of TinyGo, the binary is added manually
# to the GitHub release.
#
# - name: Install the Spin JS plugin
# shell: bash
# run: |
# spin plugin update
# spin plugin install js2wasm -y
#
# - name: Build application
# shell: bash
# run: |
# spin build
#
# - name: set the release version (tag)
# run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
#
# - name: generate checksums
# run: |
# sha256sum explorer/target/spin-kv-explorer.wasm > checksums-${{ env.RELEASE_VERSION }}.txt
# - name: Create release
# uses: softprops/action-gh-release@v1
# with:
# fail_on_unmatched_files: true
# generate_release_notes: true
# files: |
# explorer/target/spin-kv-explorer.wasm
# checksums-${{ env.RELEASE_VERSION }}.txt
fail_on_unmatched_files: true
generate_release_notes: true
files: |
explorer/main.wasm
checksums-${{ env.RELEASE_VERSION }}.txt

0 comments on commit cc713ea

Please sign in to comment.