diff --git a/.github/workflows/_container.yml b/.github/workflows/_container.yml index 38f2edd..734cc2e 100644 --- a/.github/workflows/_container.yml +++ b/.github/workflows/_container.yml @@ -21,6 +21,10 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} + - name: Set application version + if: ${{ github.ref_type == 'tag' }} + run: sed -i '0,/^version/s/^version = ".*"$/version = "${{ steps.meta.outputs.version }}"/' Cargo.toml + - name: Setup buildx uses: docker/setup-buildx-action@v3 diff --git a/Cargo.lock b/Cargo.lock index 93319e8..109b47b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -784,7 +784,7 @@ dependencies = [ [[package]] name = "glazed" -version = "0.1.0" +version = "0.0.0" dependencies = [ "async-graphql", "async-graphql-axum", diff --git a/Cargo.toml b/Cargo.toml index c2130ca..2e52d5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,8 @@ [package] name = "glazed" -version = "0.1.0" +# This version is *not* used for the built container image. It is set during the +# CI build process so that the version always matches the latest git tag. +version = "0.0.0" edition = "2024" [dependencies]