Skip to content

Commit

Permalink
Merge pull request #70 from refcell/refcell/github-workflow-fixes
Browse files Browse the repository at this point in the history
fix(ci): Github Workflows
  • Loading branch information
refcell authored Oct 27, 2023
2 parents 3347a12 + aa1f6ae commit b3bf295
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,25 @@ on:
- completed

jobs:
fetch-latest-tag:
name: Fetch the latest published git tag
extract-crate-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: WyriHaximus/github-action-get-previous-tag@v1
id: previoustag
- name: Extract the git tag version
run: echo "TAG=${{ steps.previoustag.outputs.tag }}" >> $GITHUB_OUTPUT
id: extract_git_version
- run: cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version'
- name: Export Crate Package Version
run: echo "PACKAGEV=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')" >> $GITHUB_OUTPUT
id: export_crate_version
outputs:
TAG: ${{ steps.extract_git_version.outputs.TAG }}
PACKAGEV: ${{ steps.export_crate_version.outputs.PACKAGEV }}

release:
name: Release on Github
runs-on: ubuntu-latest
permissions:
contents: write
needs: [fetch-latest-tag]
needs: [extract-crate-version]
env:
TAG: ${{ needs.fetch-latest-tag.outputs.TAG }}
PACKAGEV: ${{ needs.extract-crate-version.outputs.PACKAGEV }}
steps:
- uses: actions/checkout@v4
- name: Build the target directory
Expand All @@ -39,4 +37,4 @@ jobs:
- uses: ncipollo/release-action@v1
with:
artifacts: "release.tar.gz"
tag: ${{ env.TAG }}
tag: v${{ env.PACKAGEV }}
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- run: cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version'
- name: Export Crate Package Version
run: echo "PACKAGEV=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')" >> $GITHUB_OUTPUT
id: export_crate_package_version
id: export_crate_version
outputs:
PACKAGEV: ${{ steps.export_crate_version.outputs.PACKAGEV }}

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "2"

[workspace.package]
description = "First class, scalable rust project generator with batteries included."
version = "0.1.51"
version = "0.1.52"
edition = "2021"
license = "MIT"
authors = ["refcell"]
Expand Down

0 comments on commit b3bf295

Please sign in to comment.