Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Github Workflows #70

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading