diff --git a/.github/workflows/build_release.yaml b/.github/workflows/build_release.yaml deleted file mode 100644 index b3a894d..0000000 --- a/.github/workflows/build_release.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: Release - -on: - push: - tags: - - 'v*' - -jobs: - build: - runs-on: ${{ matrix.config.os }} - strategy: - fail-fast: false - matrix: - config: - - os: ubuntu-20.04 - rust_target: x86_64-unknown-linux-gnu - ext: '' - args: '' - - os: macos-latest - rust_target: x86_64-apple-darwin - ext: '' - args: '' - - os: macos-latest - rust_target: aarch64-apple-darwin - ext: '' - args: '' - - os: windows-latest - rust_target: x86_64-pc-windows-msvc - ext: '.exe' - args: '' - - os: windows-latest - rust_target: aarch64-pc-windows-msvc - ext: '.exe' - args: '--no-default-features --features native-tls-vendored' - - steps: - - uses: actions/checkout@v4 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - run: cargo build --verbose - - - run: cargo test --verbose - - - run: cargo build --release - - - run: tar czvf commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz -C target/release commitlint${{ matrix.config.ext }} - - - uses: softprops/action-gh-release@v1 - with: - files: | - commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz - env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 820c16b..1b6509c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,6 +14,51 @@ permissions: pages: write # To deploy to GitHub Pages jobs: + build: + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: true + matrix: + config: + - os: ubuntu-20.04 + rust_target: x86_64-unknown-linux-gnu + ext: "" + args: "" + - os: macos-latest + rust_target: x86_64-apple-darwin + ext: "" + args: "" + - os: macos-latest + rust_target: aarch64-apple-darwin + ext: "" + args: "" + - os: windows-latest + rust_target: x86_64-pc-windows-msvc + ext: ".exe" + args: "" + - os: windows-latest + rust_target: aarch64-pc-windows-msvc + ext: ".exe" + args: "--no-default-features --features native-tls-vendored" + steps: + - uses: actions/checkout@v4 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: cargo build --release + + - run: tar czvf commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz -C target/release commitlint${{ matrix.config.ext }} + + - uses: actions/upload-artifact@v4 + with: + name: commitlint-${{ matrix.config.os }} + path: commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz + if-no-files-found: error + crate: runs-on: ubuntu-latest environment: crate @@ -68,12 +113,19 @@ jobs: publish: runs-on: ubuntu-latest needs: + - build - crate - docker - web steps: + - uses: actions/download-artifact@v4 + with: + path: commitlint + pattern: commitlint-* + merge-multiple: true - uses: ncipollo/release-action@v1 with: + artifacts: commitlint/commitlint-*.tar.gz generateReleaseNotes: true web: diff --git a/Cargo.lock b/Cargo.lock index 2b14d6f..4a9c62e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,7 +167,7 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "commitlint-rs" -version = "0.1.7" +version = "0.1.8" dependencies = [ "clap", "futures", diff --git a/Cargo.toml b/Cargo.toml index 67b13b6..dcfe5a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ documentation = "https://keisukeyamashita.github.io/commitlint-rs" authors = ["KeisukeYamashita <19yamashita15@gmail.com>"] keywords = ["conventional-commits", "lint"] categories = ["command-line-utilities"] -version = "0.1.7" +version = "0.1.8" readme = "README.md" repository = "https://github.com/KeisukeYamashita/commitlint-rs" license = "MIT OR Apache-2.0"