Skip to content

Commit

Permalink
ci: more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmg-duarte committed Nov 12, 2024
1 parent f796cba commit 55b86a6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
name: Check version match
run: |
# used later in the build for docker tagging
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked |
jq -r '.packages[] | select(.name == "mater-cli") | .version')"
PACKAGE_VERSION="$(cargo metadata --no-deps --color never --format-version 1 --locked | jq -r '.packages[] | select(.name == "mater-cli") | .version')"
# used for checking the tag
PACKAGE_VERSION_WITH_NAME=$(echo "mater-cli-v$PACKAGE_VERSION")
Expand All @@ -51,7 +50,9 @@ jobs:
fi
# make the version available as a "checked" output in later steps
echo "PACKAGE_VERSION=$(PACKAGE_VERSION)" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$(PACKAGE_VERSION)" >> "$GITHUB_OUTPUT"
env
- name: Build in release mode
run: RUSTFLAGS="-D warnings" cargo build --release --locked --package mater-cli
Expand All @@ -68,10 +69,10 @@ jobs:
docker build \
--build-arg VCS_REF="$(git rev-parse HEAD)" \
--build-arg BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag ghcr.io/eigerco/mater-cli:"$PACKAGE_VERSION" \
--tag ghcr.io/eigerco/mater-cli:"${{ steps.check-version.outputs.PACKAGE_VERSION }}" \
--file ./docker/dockerfiles/mater-cli.Dockerfile \
.
docker push ghcr.io/eigerco/mater-cli:"$PACKAGE_VERSION"
docker push ghcr.io/eigerco/mater-cli:"${{ steps.check-version.outputs.PACKAGE_VERSION }}"
- name: Perform release
uses: softprops/action-gh-release@v2
Expand All @@ -80,7 +81,7 @@ jobs:
with:
tag_name: ${{ github.ref_name }} # set the name of the release the tag
body: |
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/mater-cli/?tag=${{ env.PACKAGE_VERSION }}
Docker container release: https://github.com/eigerco/polka-storage/pkgs/container/mater-cli/?tag=${{ steps.check-version.outputs.PACKAGE_VERSION }}
files: |
target/release/mater-cli
Expand Down

0 comments on commit 55b86a6

Please sign in to comment.