Skip to content

Commit

Permalink
v0.9.2
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <xavier@inv.cafe>
  • Loading branch information
aurexav committed Apr 3, 2023
1 parent e244d63 commit 7ead160
Show file tree
Hide file tree
Showing 51 changed files with 3,265 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ jobs:
uses: vishnudxb/cancel-workflow@v1.2
if: failure()
with:
repo: hack-ink/<NAME>
repo: hack-ink/substrate-minimal
workflow_id: ${{ github.run_id }}
access_token: ${{ github.token }}
24 changes: 12 additions & 12 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "latest"
- name: Build pages
run: mdbook build doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/book
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: "latest"
# - name: Build pages
# run: mdbook build doc
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.ref == 'refs/heads/main' }}
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: doc/book
80 changes: 9 additions & 71 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,85 +8,23 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build ${{ matrix.target.name }} package
runs-on: ${{ matrix.target.os }}
strategy:
matrix:
target:
[
{ name: x86_64-unknown-linux-gnu, os: ubuntu-latest },
{ name: aarch64-apple-darwin, os: macos-latest },
{ name: x86_64-apple-darwin, os: macos-latest },
{
name: x86_64-pc-windows-msvc,
os: windows-latest,
extension: .exe,
},
]
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Setup Rust toolchain
run: rustup target add ${{ matrix.target.name }}
- name: Build
run: cargo build --release --locked --target ${{ matrix.target.name }}
- name: Compress
run: |
mv target/${{ matrix.target.name }}/release/<NAME>${{ matrix.target.extension }} .
zstd --ultra -22 -o <NAME>-${{ matrix.target.name }}.zst <NAME>${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv <NAME>-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/upload-artifact@v3.1.2
with:
name: artifacts
path: artifacts

release:
name: Release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: artifacts
path: artifacts
- name: Hash
run: |
cd artifacts
sha256sum * | tee ../SHA256
md5sum * | tee ../MD5
mv ../SHA256 .
mv ../MD5 .
- name: Publish
uses: softprops/action-gh-release@v1
with:
discussion_category_name: Announcements
generate_release_notes: true
files: artifacts/*

# publish-on-crates-io:
# name: Publish on crates.io
# runs-on: ubuntu-latest
# steps:
# - name: Fetch latest code
# uses: actions/checkout@v3
# - name: Login
# run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
# - name: Publish
# run: .maintain/release.sh

clean-artifacts:
name: Clean artifacts
if: always()
needs: [release]
steps:
- name: Clean artifacts
uses: geekyeggo/delete-artifact@v2
with:
name: artifacts
publish-on-crates-io:
name: Publish on crates.io
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Login
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish
run: .maintain/release.sh
84 changes: 0 additions & 84 deletions .github/workflows/staging.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .maintain/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

cargo publish --locked -p subcryptor
cargo publish --locked -p subhasher
cargo publish --locked -p submetadatan
cargo publish --locked -p subrpcer
cargo publish --locked -p subruntimer
cargo publish --locked -p subspector
# substorager depends on subhasher, sleep for 30s
sleep 30
cargo publish --locked -p substorager
cargo publish --locked -p subversioner
Loading

0 comments on commit 7ead160

Please sign in to comment.