mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-09 13:53:03 +02:00
fix: Fix step order
This commit is contained in:
parent
30df03524f
commit
d3c88c6242
1 changed files with 25 additions and 25 deletions
|
@ -32,31 +32,6 @@ jobs:
|
||||||
echo "distribution=$DISTRIBUTION" >> $GITHUB_OUTPUT
|
echo "distribution=$DISTRIBUTION" >> $GITHUB_OUTPUT
|
||||||
echo "Debian distribution: $DISTRIBUTION ($VERSION)"
|
echo "Debian distribution: $DISTRIBUTION ($VERSION)"
|
||||||
|
|
||||||
- name: Get package revision and component
|
|
||||||
id: package-meta
|
|
||||||
run: |
|
|
||||||
BASE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"conduwuit\").version" | sed 's/~/-/g')
|
|
||||||
# VERSION is the package version, COMPONENT is used in
|
|
||||||
# apt's repository config like a git repo branch
|
|
||||||
if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then
|
|
||||||
COMPONENT="stable"
|
|
||||||
VERSION=$BASE_VERSION
|
|
||||||
else
|
|
||||||
SHA=$(echo "${{ forge.sha }}" | cut -c1-7)
|
|
||||||
DATE=$(date +%Y%M%d)
|
|
||||||
if [ "${{ forge.ref_name }}" = "main" ]; then
|
|
||||||
COMPONENT="dev"
|
|
||||||
else
|
|
||||||
# Use sanitized ref name for the component
|
|
||||||
COMPONENT=$(echo "${{ forge.ref_name }}" | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)
|
|
||||||
fi
|
|
||||||
VERSION="$BASE_VERSION~git$DATE.$SHA-$COMPONENT"
|
|
||||||
fi
|
|
||||||
echo "component=$COMPONENT" >> $GITHUB_OUTPUT
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
echo "Component: $COMPONENT"
|
|
||||||
echo "Version: $VERSION"
|
|
||||||
|
|
||||||
- name: Checkout repository with full history
|
- name: Checkout repository with full history
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -90,6 +65,31 @@ jobs:
|
||||||
rust-version: nightly
|
rust-version: nightly
|
||||||
github-token: ${{ secrets.GH_PUBLIC_RO }}
|
github-token: ${{ secrets.GH_PUBLIC_RO }}
|
||||||
|
|
||||||
|
- name: Get package revision and component
|
||||||
|
id: package-meta
|
||||||
|
run: |
|
||||||
|
BASE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"conduwuit\").version" | sed 's/~/-/g')
|
||||||
|
# VERSION is the package version, COMPONENT is used in
|
||||||
|
# apt's repository config like a git repo branch
|
||||||
|
if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then
|
||||||
|
COMPONENT="stable"
|
||||||
|
VERSION=$BASE_VERSION
|
||||||
|
else
|
||||||
|
SHA=$(echo "${{ forge.sha }}" | cut -c1-7)
|
||||||
|
DATE=$(date +%Y%M%d)
|
||||||
|
if [ "${{ forge.ref_name }}" = "main" ]; then
|
||||||
|
COMPONENT="dev"
|
||||||
|
else
|
||||||
|
# Use sanitized ref name for the component
|
||||||
|
COMPONENT=$(echo "${{ forge.ref_name }}" | sed 's/[^a-zA-Z0-9]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)
|
||||||
|
fi
|
||||||
|
VERSION="$BASE_VERSION~git$DATE.$SHA-$COMPONENT"
|
||||||
|
fi
|
||||||
|
echo "component=$COMPONENT" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Component: $COMPONENT"
|
||||||
|
echo "Version: $VERSION"
|
||||||
|
|
||||||
- name: Check cargo-deb version
|
- name: Check cargo-deb version
|
||||||
id: cargo-deb-version
|
id: cargo-deb-version
|
||||||
run: echo "version=$(curl -s \"https://index.crates.io/ca/rg/cargo-deb\" | tail -n1 | jq -r .vers)" >> $GITHUB_OUTPUT
|
run: echo "version=$(curl -s \"https://index.crates.io/ca/rg/cargo-deb\" | tail -n1 | jq -r .vers)" >> $GITHUB_OUTPUT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue