mirror of
https://github.com/lune-org/lune.git
synced 2025-04-10 21:40:54 +01:00
Add publishing to crates.io in release workflow
This commit is contained in:
parent
2a7a198d58
commit
d951361ad9
1 changed files with 40 additions and 4 deletions
44
.github/workflows/release.yaml
vendored
44
.github/workflows/release.yaml
vendored
|
@ -27,8 +27,26 @@ jobs:
|
||||||
file: Cargo.toml
|
file: Cargo.toml
|
||||||
field: package.version
|
field: package.version
|
||||||
|
|
||||||
build:
|
dry-run:
|
||||||
|
name: Dry-run
|
||||||
needs: ["init"]
|
needs: ["init"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Publish (dry-run)
|
||||||
|
uses: katyo/publish-crates@v2
|
||||||
|
with:
|
||||||
|
dry-run: true
|
||||||
|
check-repo: true
|
||||||
|
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
build:
|
||||||
|
needs: ["init", "dry-run"]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -91,10 +109,10 @@ jobs:
|
||||||
name: ${{ matrix.artifact-name }}
|
name: ${{ matrix.artifact-name }}
|
||||||
path: release.zip
|
path: release.zip
|
||||||
|
|
||||||
release:
|
release-github:
|
||||||
name: Release
|
name: Release (GitHub)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ["init", "build"]
|
needs: ["init", "dry-run", "build"]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -120,3 +138,21 @@ jobs:
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: ./releases/*.zip
|
files: ./releases/*.zip
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
|
release-crates:
|
||||||
|
name: Release (crates.io)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: ["init", "dry-run", "build"]
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Publish crates
|
||||||
|
uses: katyo/publish-crates@v2
|
||||||
|
with:
|
||||||
|
dry-run: false
|
||||||
|
check-repo: true
|
||||||
|
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue