diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13932bc..fa3b995 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,26 @@ on: name: Create Release jobs: + publish-crate: + name: Publish to crates.io + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - run: cargo login ${CRATES_IO_TOKEN} + env: + CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + - run: cargo build --release --locked + - run: ./target/release/chomp prebuild + - name: publish chomp + run: cargo publish + create-github-release: name: Create GitHub Release + needs: publish-crate runs-on: ubuntu-latest steps: - name: Checkout code @@ -23,8 +41,8 @@ jobs: build: name: Build assets for ${{ matrix.os }} - runs-on: ${{ matrix.os }} needs: create-github-release + runs-on: ${{ matrix.os }} strategy: matrix: name: [ @@ -51,7 +69,6 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: guybedford/chomp-action@v1 - name: Set env run: | @@ -65,7 +82,7 @@ jobs: toolchain: stable - name: Build - run: chomp build:release + run: cargo build --release --locked - name: archive release shell: bash @@ -84,20 +101,3 @@ jobs: file: chomp*${{ matrix.asset_extension }} file_glob: true tag: ${{ github.ref }} - - publish-crate: - name: Publish to crates.io - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: guybedford/chomp-action@v1 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - - run: cargo login ${CRATES_IO_TOKEN} - env: - CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - - run: chomp prebuild - - name: publish chomp - run: cargo publish diff --git a/Cargo.lock b/Cargo.lock index 9cde3de..446a97b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,7 +155,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chompbuild" -version = "0.1.10" +version = "0.1.11" dependencies = [ "anyhow", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index 205d080..f6a5425 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chompbuild" -version = "0.1.10" +version = "0.1.11" authors = ["Guy Bedford "] edition = "2021" license = "GPL-3.0" diff --git a/src/main.rs b/src/main.rs index 8163299..a5d5960 100644 --- a/src/main.rs +++ b/src/main.rs @@ -71,9 +71,9 @@ fn uri_parse(uri_str: &str) -> Option { #[tokio::main] async fn main() -> Result<()> { #[cfg(not(debug_assertions))] - let version = "0.1.10"; + let version = "0.1.11"; #[cfg(debug_assertions)] - let version = "0.1.10-debug"; + let version = "0.1.11-debug"; let matches = App::new("Chomp") .version(version) .arg(