diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a307ff2..761b00f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,8 @@ jobs: - name: Build run: cross build --release - release-lib: + # Release Lib to crates.io + release-lib-crates: name: Release Lib to crates.io runs-on: ubuntu-latest needs: [tag-release] @@ -63,12 +64,11 @@ jobs: run: cargo publish -p alienware - name: Create CLI Release - uses: marvinpinto/action-automatic-releases@latest + uses: softprops/action-gh-release@v1 with: - automatic_release_tag: "latest" - title: "Release ${{ github.ref_name }}" - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false + tag_name: "${{ github.ref_name }}" + name: "Release ${{ github.ref_name }}" + token: "${{ secrets.GITHUB_TOKEN }}" files: | LICENSE target/release/alienware-cli @@ -77,10 +77,11 @@ jobs: run: sleep 10s shell: bash + # Release CLI to crates.io release-cli-crates: name: Release CLI to crates.io runs-on: ubuntu-latest - needs: [release-lib] + needs: [release-lib-crates] if: github.ref_type == 'tag' && ( contains(github.ref_name, '-') == false ) strategy: matrix: @@ -103,11 +104,33 @@ jobs: CARGO_REGISTRY_TOKEN: "${{ secrets.CRATES_TOKEN }}" run: cargo publish -p alienware_cli + # Create the release artifacts in GitHub + release-gh: + name: Create the release artifacts in GitHub + runs-on: ubuntu-latest + needs: [tag-release] + if: github.ref_type == 'tag' && ( contains(github.ref_name, '-') == false ) + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Create CLI Release + uses: softprops/action-gh-release@v1 + with: + tag_name: "${{ github.ref_name }}" + name: "Release ${{ github.ref_name }}" + token: "${{ secrets.GITHUB_TOKEN }}" + files: | + LICENSE + target/release/alienware-cli + # Kick off the workflow in this repo that will generate the snapcraft yaml file release-cli-snap: name: Initiate release of the alienware cli application runs-on: ubuntu-latest - needs: [tag-release] + needs: [release-cli-crates] + if: github.ref_type == 'tag' && ( contains(github.ref_name, '-') == false ) steps: - name: Repository Dispatch diff --git a/Cargo.toml b/Cargo.toml index fd50a4b..1080436 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,4 @@ members = [ "alienware_cli", "alienware", ] +resolver = "2"