Skip to content

Commit

Permalink
Fix 💿
Browse files Browse the repository at this point in the history
  • Loading branch information
git-commit committed Nov 29, 2023
1 parent eec5b7f commit 5e53280
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,53 @@ name: Rust

on:
push:
branches: [ "canon" ]
branches: ["canon"]
pull_request:
branches: [ "canon" ]
branches: ["canon"]

env:
CARGO_TERM_COLOR: always
release_name: build_${{github.run_number}}
# an=artifact_name
an_napoli_pain: napoli-pain-wasm.tar.gz


jobs:
build:
runs-on: ubuntu-22.04
environment: "build"
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: arduino/setup-protoc@v1
- uses: jetli/[email protected]
with:
# Optional version of trunk to install(eg. 'v0.16.0', 'latest')
version: 'latest'
- name: Build All
run: cargo build --verbose
- name: Run all tests
run: cargo test --verbose
- name: Build release for ${{ env.an_napoli_pain }}
run: |
cd napoli-pain
trunk build --release index.html
tar -czvf ${{ env.an_napoli_pain }} dist/
env:
BACKEND_URL: ${{ vars.BACKEND_URL }}
- name: Upload ${{ env.an_napoli_pain }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.an_napoli_pain }}
path: napoli-pain/${{ env.an_napoli_pain }}
retention-days: 5
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: arduino/setup-protoc@v1
- uses: jetli/[email protected]
with:
# Optional version of trunk to install(eg. 'v0.16.0', 'latest')
version: "latest"
- name: Build All
run: cargo build --verbose
- name: Run all tests
run: cargo test --verbose
- name: Build release for ${{ env.an_napoli_pain }}
run: |
cd napoli-pain
trunk build --release index.html
tar -czvf ${{ env.an_napoli_pain }} dist/
env:
BACKEND_URL: ${{ vars.BACKEND_URL }}
- name: Upload ${{ env.an_napoli_pain }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.an_napoli_pain }}
path: napoli-pain/${{ env.an_napoli_pain }}
retention-days: 5

release:
needs: build
Expand All @@ -61,9 +60,10 @@ jobs:
with:
path: artifacts

- name: 'Create Release'
- name: "Create Release"
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y hub
hub release create ${{ env.release_name }} -m ${{ env.release_name }} -a artifacts/${{ env.an_napoli_pain }}/${{ env.an_napoli_pain }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5e53280

Please sign in to comment.