diff --git a/.gitea/workflows/build-app-linux.yml b/.gitea/workflows/build-app-linux.yml index b0d8964..4d6f86a 100644 --- a/.gitea/workflows/build-app-linux.yml +++ b/.gitea/workflows/build-app-linux.yml @@ -13,23 +13,14 @@ jobs: runs-on: ubuntu-latest env: NODE_VERSION: "20" + RELEASE_TAG: ${{ inputs.tag }} steps: - - name: Determine tag - id: tag - run: | - TAG="${{ inputs.tag }}" - if [ -z "$TAG" ]; then - TAG="${{ github.event.inputs.tag }}" - fi - if [ -z "$TAG" ]; then - TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||') - fi - echo "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $GITHUB_OUTPUT + - name: Show tag + run: echo "Building for tag: ${RELEASE_TAG}" - uses: actions/checkout@v4 with: - ref: ${{ steps.tag.outputs.tag }} + ref: ${{ inputs.tag }} - name: Set up Node.js uses: actions/setup-node@v4 @@ -58,7 +49,7 @@ jobs: run: | sudo apt-get install -y jq REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" - TAG="${{ steps.tag.outputs.tag }}" + TAG="${RELEASE_TAG}" echo "Release tag: ${TAG}" echo "Waiting for release ${TAG} to be available..." diff --git a/.gitea/workflows/build-app-macos.yml b/.gitea/workflows/build-app-macos.yml index 38ba639..068ad56 100644 --- a/.gitea/workflows/build-app-macos.yml +++ b/.gitea/workflows/build-app-macos.yml @@ -13,23 +13,14 @@ jobs: runs-on: macos-latest env: NODE_VERSION: "20" + RELEASE_TAG: ${{ inputs.tag }} steps: - - name: Determine tag - id: tag - run: | - TAG="${{ inputs.tag }}" - if [ -z "$TAG" ]; then - TAG="${{ github.event.inputs.tag }}" - fi - if [ -z "$TAG" ]; then - TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | head -1 | sed 's|.*refs/tags/||') - fi - echo "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $GITHUB_OUTPUT + - name: Show tag + run: echo "Building for tag: ${RELEASE_TAG}" - uses: actions/checkout@v4 with: - ref: ${{ steps.tag.outputs.tag }} + ref: ${{ inputs.tag }} - name: Set up Node.js uses: actions/setup-node@v4 @@ -56,7 +47,7 @@ jobs: run: | which jq || brew install jq REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" - TAG="${{ steps.tag.outputs.tag }}" + TAG="${RELEASE_TAG}" echo "Release tag: ${TAG}" echo "Waiting for release ${TAG} to be available..." diff --git a/.gitea/workflows/build-sidecar-linux.yml b/.gitea/workflows/build-sidecar-linux.yml index c9a604a..77ff38a 100644 --- a/.gitea/workflows/build-sidecar-linux.yml +++ b/.gitea/workflows/build-sidecar-linux.yml @@ -13,23 +13,14 @@ jobs: runs-on: ubuntu-latest env: PYTHON_VERSION: "3.11" + RELEASE_TAG: ${{ inputs.tag }} steps: - - name: Determine tag - id: tag - run: | - TAG="${{ inputs.tag }}" - if [ -z "$TAG" ]; then - TAG="${{ github.event.inputs.tag }}" - fi - if [ -z "$TAG" ]; then - TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||') - fi - echo "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $GITHUB_OUTPUT + - name: Show tag + run: echo "Building for tag: ${RELEASE_TAG}" - uses: actions/checkout@v4 with: - ref: ${{ steps.tag.outputs.tag }} + ref: ${{ inputs.tag }} - name: Install uv run: | @@ -75,7 +66,7 @@ jobs: run: | sudo apt-get install -y jq REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" - TAG="${{ steps.tag.outputs.tag }}" + TAG="${RELEASE_TAG}" echo "Waiting for sidecar release ${TAG} to be available..." for i in $(seq 1 30); do diff --git a/.gitea/workflows/build-sidecar-macos.yml b/.gitea/workflows/build-sidecar-macos.yml index 84e060b..e8eec8d 100644 --- a/.gitea/workflows/build-sidecar-macos.yml +++ b/.gitea/workflows/build-sidecar-macos.yml @@ -13,23 +13,14 @@ jobs: runs-on: macos-latest env: PYTHON_VERSION: "3.11" + RELEASE_TAG: ${{ inputs.tag }} steps: - - name: Determine tag - id: tag - run: | - TAG="${{ inputs.tag }}" - if [ -z "$TAG" ]; then - TAG="${{ github.event.inputs.tag }}" - fi - if [ -z "$TAG" ]; then - TAG=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/sidecar-v*' | head -1 | sed 's|.*refs/tags/||') - fi - echo "Building for tag: ${TAG}" - echo "tag=${TAG}" >> $GITHUB_OUTPUT + - name: Show tag + run: echo "Building for tag: ${RELEASE_TAG}" - uses: actions/checkout@v4 with: - ref: ${{ steps.tag.outputs.tag }} + ref: ${{ inputs.tag }} - name: Install uv run: | @@ -66,7 +57,7 @@ jobs: run: | which jq || brew install jq REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" - TAG="${{ steps.tag.outputs.tag }}" + TAG="${RELEASE_TAG}" echo "Waiting for sidecar release ${TAG} to be available..." for i in $(seq 1 30); do diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4000e28..f7c4329 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -159,9 +159,7 @@ jobs: echo " Deleting release ${TAG} (ID: ${ID})..." curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \ "${REPO_API}/releases/${ID}" - - # Also delete the tag - curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \ - "${REPO_API}/tags/${TAG}" + # Keep the git tag -- only delete the release (assets). + # Deleting tags breaks builds that haven't checked out yet. done echo "Cleanup complete" diff --git a/.gitea/workflows/sidecar-release.yml b/.gitea/workflows/sidecar-release.yml index 30bdc7f..f8df662 100644 --- a/.gitea/workflows/sidecar-release.yml +++ b/.gitea/workflows/sidecar-release.yml @@ -166,9 +166,7 @@ jobs: echo " Deleting sidecar release ${TAG} (ID: ${ID})..." curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \ "${REPO_API}/releases/${ID}" - - # Also delete the tag - curl -s -X DELETE -H "Authorization: token ${BUILD_TOKEN}" \ - "${REPO_API}/tags/${TAG}" + # Keep the git tag -- only delete the release (assets). + # Deleting tags breaks builds that haven't checked out yet. done echo "Cleanup complete"