Skip to content

Commit

Permalink
Release action change (#18)
Browse files Browse the repository at this point in the history
* Change the unsupported `marvinpinto/action-automatic-releases` action and replace with `softprops/action-gh-release` which has been updated to support the latest node16 requirement.

* Update `workspace.resolver = 2` so that the build uses the 2021 edition

* separate the gh release from the lib
  • Loading branch information
a1ecbr0wn authored Jan 23, 2024
1 parent d11f94f commit 8b398c9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
39 changes: 31 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ members = [
"alienware_cli",
"alienware",
]
resolver = "2"

0 comments on commit 8b398c9

Please sign in to comment.