Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Release v0.1.0 (#2)
Browse files Browse the repository at this point in the history
* Stash

Signed-off-by: Xavier Lau <[email protected]>

* Done

* Release `v0.1.0`

* Fix

* Update

---------

Signed-off-by: Xavier Lau <[email protected]>
  • Loading branch information
AurevoirXavier authored Sep 6, 2023
1 parent bfddc83 commit e57471a
Show file tree
Hide file tree
Showing 9 changed files with 2,517 additions and 86 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ on:
- main

env:
CARGO_INCREMENTAL: 1
CACHE_VERSION: 0

CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_TERM_COLOR: always

GITHUB_CACHE_VERSION: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

RUST_BACKTRACE: full
Expand All @@ -26,34 +27,33 @@ jobs:
steps:
- name: Fetch latest code
uses: actions/checkout@v4
- name: Cache cargo
uses: actions/cache@v3
- name: Setup build environment
if: matrix.action != 'fmt'
run: rustup show
- uses: Swatinem/rust-cache@v2
if: matrix.action != 'fmt'
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-${{ env.GITHUB_CACHE_VERSION }}-${{ matrix.action }}-
- name: Cargo ${{ matrix.action }}
prefix-key: ${{ env.CACHE_VERSION }}
key: ${{ matrix.action }}
- name: Cargo clippy
if: matrix.action == 'clippy'
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --all-targets --locked
- name: Cargo ${{ matrix.action }}
- name: Cargo fmt
if: matrix.action == 'fmt'
run: cargo ${{ matrix.action }} --all -- --check
run: cargo fmt --all -- --check
- name: Install cargo-nextest
if: matrix.action == 'nextest'
uses: taiki-e/install-action@nextest
- name: Cargo ${{ matrix.action }}
- name: Cargo nextest
if: matrix.action == 'nextest'
run: cargo ${{ matrix.action }} run --release --workspace --all-features --all-targets --locked
run: cargo nextest run --cargo-profile ci-dev --workspace --all-features --all-targets --locked
- name: Fast fail
uses: vishnudxb/[email protected]
if: failure()
with:
repo: hack-ink/<NAME>
repo: hack-ink/telegram-webhook
workflow_id: ${{ github.run_id }}
access_token: ${{ github.token }}
34 changes: 0 additions & 34 deletions .github/workflows/pages.yml

This file was deleted.

29 changes: 14 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
[
{ 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,
Expand All @@ -30,15 +29,15 @@ jobs:
- name: Setup Rust toolchain
run: rustup target add ${{ matrix.target.name }}
- name: Build
run: cargo build --release --locked --target ${{ matrix.target.name }}
run: cargo build --profile ci-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 }}
mv target/${{ matrix.target.name }}/ci-release/telegram-webhook${{ matrix.target.extension }} .
zstd --ultra -22 -o telegram-webhook-${{ matrix.target.name }}.zst telegram-webhook${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv <NAME>-${{ matrix.target.name }}.zst artifacts
mv telegram-webhook-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -69,16 +68,16 @@ jobs:
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@v4
# - name: Login
# run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
# - name: Publish
# run: .maintain/release.sh
publish-on-crates-io:
name: Publish on crates.io
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v4
- name: Login
run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish
run: cargo publish --locked

clean-artifacts:
name: Clean artifacts
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
[
{ 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,
Expand All @@ -28,15 +27,15 @@ jobs:
- name: Setup Rust toolchain
run: rustup target add ${{ matrix.target.name }}
- name: Build
run: cargo build --release --locked --target ${{ matrix.target.name }}
run: cargo build --profile ci-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 }}
mv target/${{ matrix.target.name }}/ci-release/telegram-webhook${{ matrix.target.extension }} .
zstd --ultra -22 -o telegram-webhook-${{ matrix.target.name }}.zst telegram-webhook${{ matrix.target.extension }}
- name: Collect artifact
run: |
mkdir -p artifacts
mv <NAME>-${{ matrix.target.name }}.zst artifacts
mv telegram-webhook-${{ matrix.target.name }}.zst artifacts
- name: Upload artifact
uses: actions/[email protected]
with:
Expand All @@ -60,6 +59,12 @@ jobs:
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
Expand All @@ -70,7 +75,7 @@ jobs:
# - name: Login
# run: cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
# - name: Publish
# run: .maintain/release.sh
# run: cargo publish --locked

clean-artifacts:
name: Clean artifacts
Expand Down
Loading

0 comments on commit e57471a

Please sign in to comment.