This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing release and build actions for actors (#17)
* created action for echo, updated echo to interface versions, included action template * implemented template and echo action renaming rust action for echo changed test to bin format instead of lib removed keys and makefiles, implemented logger actions updated subscriber actions moved inmemory-keyvalue, implemented actions fixed logger action * updated inmemorykeyvalue GH subject secret
- Loading branch information
1 parent
66073b4
commit 2eeb6f3
Showing
28 changed files
with
777 additions
and
192 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: ECHO-RELEASE | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'echo-v*' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
working-directory: ./echo | ||
DESTINATION: target/wasm32-unknown-unknown/release/echo_s.wasm | ||
WASH_ISSUER_KEY: ${{ secrets.WASMCLOUD_ACCOUNT_OFFICIAL }} | ||
WASH_SUBJECT_KEY: ${{ secrets.WASMCLOUD_ECHO }} | ||
WASH_REG_USER: ${{ secrets.AZURECR_PUSH_USER }} | ||
WASH_REG_PASSWORD: ${{ secrets.AZURECR_PUSH_PASSWORD }} | ||
REVISION: ${{ github.run_number }} | ||
|
||
jobs: | ||
cargo_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Build | ||
run: cargo build --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Run tests | ||
run: cargo test --bins --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Check fmt | ||
run: cargo fmt -- --check | ||
working-directory: ${{ env.working-directory }} | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Run cargo clippy | ||
run: cargo clippy --all-features | ||
working-directory: ${{ env.working-directory }} | ||
|
||
github_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: true | ||
|
||
artifact_release: | ||
needs: github_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
curl -s https://packagecloud.io/install/repositories/wasmCloud/core/script.deb.sh | sudo bash | ||
sudo apt install wash | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Build | ||
run: cargo build --release | ||
working-directory: ${{ env.working-directory }} | ||
- name: Wash Sign Claim | ||
run: | | ||
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version') | ||
#TODO: SIGN WITH GOOD CAPABILITIES AND CHANGE NAME | ||
wash claims sign target/wasm32-unknown-unknown/release/echo.wasm -c wasmcloud:httpserver --disable-keygen --name "Echo" --ver $VERSION --rev ${{ env.REVISION }} | ||
working-directory: ${{ env.working-directory }} | ||
# Push artifact to https://AZURECR/echo:VERSION | ||
- name: push-artifact | ||
run: | | ||
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version') | ||
URL=${{secrets.AZURECR_PUSH_URL}}/echo:$VERSION | ||
wash reg push $URL ${{ env.DESTINATION }} | ||
working-directory: ${{ env.working-directory }} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: ECHO | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "echo/**" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "echo/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
working-directory: ./echo | ||
|
||
jobs: | ||
cargo_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Build | ||
run: cargo build --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Run tests | ||
run: cargo test --bins --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Check fmt | ||
run: cargo fmt -- --check | ||
working-directory: ${{ env.working-directory }} | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Run cargo clippy | ||
run: cargo clippy --all-features | ||
working-directory: ${{ env.working-directory }} |
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: INMEMORY-KEYVALUE-RELEASE | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'inmemory-keyvalue-v*' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
working-directory: ./inmemory-keyvalue | ||
DESTINATION: inmemory-keyvalue.par.gz #aka the filename of the parJEEzy | ||
WASH_ISSUER_KEY: ${{ secrets.WASMCLOUD_ACCOUNT_OFFICIAL }} | ||
WASH_SUBJECT_KEY: ${{ secrets.WASMCLOUD_INMEMORY_KEYVALUE }} | ||
WASH_REG_USER: ${{ secrets.AZURECR_PUSH_USER }} | ||
WASH_REG_PASSWORD: ${{ secrets.AZURECR_PUSH_PASSWORD }} | ||
REVISION: ${{ github.run_number }} | ||
|
||
jobs: | ||
cargo_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Run tests | ||
run: cargo test --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Check fmt | ||
run: cargo fmt -- --check | ||
working-directory: ${{ env.working-directory }} | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Run cargo clippy | ||
run: cargo clippy --all-features | ||
working-directory: ${{ env.working-directory }} | ||
|
||
github_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: true | ||
|
||
crates_release: | ||
needs: github_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Cargo login | ||
env: | ||
CRATES_TOKEN: ${{ secrets.CRATES_PUBLISH_TOKEN }} | ||
run: cargo login ${{ env.CRATES_TOKEN }} | ||
- name: Cargo publish | ||
run: cargo publish --no-verify | ||
working-directory: ${{ env.working-directory }} | ||
|
||
artifact_release: | ||
needs: github_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
curl -s https://packagecloud.io/install/repositories/wasmCloud/core/script.deb.sh | sudo bash | ||
sudo apt install wash | ||
- run: cargo install --git https://github.com/ChrisRx/cross --branch add-darwin-target --force # Installing from feature branch until PR merged | ||
- name: build-par | ||
run: make par | ||
working-directory: ${{ env.working-directory }} | ||
# Push artifact to https://AZURECR/inmemory-keyvalue:VERSION | ||
- name: push-par | ||
run: | | ||
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version') | ||
URL=${{secrets.AZURECR_PUSH_URL}}/inmemory-keyvalue:$VERSION | ||
wash reg push $URL ${{ env.DESTINATION }} | ||
working-directory: ${{ env.working-directory }} |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: INMEMORY-KEYVALUE | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "inmemory-keyvalue/**" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "inmemory-keyvalue/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
working-directory: ./inmemory-keyvalue | ||
|
||
jobs: | ||
cargo_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --verbose | ||
working-directory: ${{env.working-directory}} | ||
- name: Run tests | ||
run: cargo test --verbose | ||
working-directory: ${{env.working-directory}} | ||
- name: Check fmt | ||
run: cargo fmt -- --check | ||
working-directory: ${{env.working-directory}} | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Run cargo clippy | ||
run: cargo clippy --all-features | ||
working-directory: ${{env.working-directory}} |
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: LOGGER-RELEASE | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'logger-v*' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
working-directory: ./logger | ||
DESTINATION: target/wasm32-unknown-unknown/release/logger_s.wasm | ||
WASH_ISSUER_KEY: ${{ secrets.WASMCLOUD_ACCOUNT_OFFICIAL }} | ||
WASH_SUBJECT_KEY: ${{ secrets.WASMCLOUD_LOGGER }} | ||
WASH_REG_USER: ${{ secrets.AZURECR_PUSH_USER }} | ||
WASH_REG_PASSWORD: ${{ secrets.AZURECR_PUSH_PASSWORD }} | ||
REVISION: ${{ github.run_number }} | ||
|
||
jobs: | ||
cargo_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Build | ||
run: cargo build --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Run tests | ||
run: cargo test --bins --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Check fmt | ||
run: cargo fmt -- --check | ||
working-directory: ${{ env.working-directory }} | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Run cargo clippy | ||
run: cargo clippy --all-features | ||
working-directory: ${{ env.working-directory }} | ||
|
||
github_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: true | ||
|
||
artifact_release: | ||
needs: github_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
curl -s https://packagecloud.io/install/repositories/wasmCloud/core/script.deb.sh | sudo bash | ||
sudo apt install wash | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Build | ||
run: cargo build --release | ||
working-directory: ${{ env.working-directory }} | ||
- name: Wash Sign Claim | ||
run: | | ||
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version') | ||
wash claims sign target/wasm32-unknown-unknown/release/logger.wasm -c wasmcloud:httpserver -c wasmcloud:logging --disable-keygen --name "Logger" --ver $VERSION --rev ${{ env.REVISION }} | ||
working-directory: ${{ env.working-directory }} | ||
# Push artifact to https://AZURECR/logger:VERSION | ||
- name: push-artifact | ||
run: | | ||
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].version') | ||
URL=${{secrets.AZURECR_PUSH_URL}}/logger:$VERSION | ||
wash reg push $URL ${{ env.DESTINATION }} | ||
working-directory: ${{ env.working-directory }} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: LOGGER | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "logger/**" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "logger/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
working-directory: ./logger | ||
|
||
jobs: | ||
cargo_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Build | ||
run: cargo build --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Run tests | ||
run: cargo test --bins --verbose | ||
working-directory: ${{ env.working-directory }} | ||
- name: Check fmt | ||
run: cargo fmt -- --check | ||
working-directory: ${{ env.working-directory }} | ||
|
||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: rustup component add clippy | ||
- name: Add wasm32-unknown-unknown | ||
run: rustup target add wasm32-unknown-unknown | ||
- name: Run cargo clippy | ||
run: cargo clippy --all-features | ||
working-directory: ${{ env.working-directory }} |
Oops, something went wrong.