Skip to content

Commit

Permalink
Release tag workflow fixes (#1215)
Browse files Browse the repository at this point in the history
* Remove charm workflows and fix name

* Renames and update artifact workflow version

* Ensure the latest tag is not replaced with a lightweight tag

Due to the issues mentioned in the comments, when using the Github checkout action, when checking out via tag, the desired tag is converted to a lightweight tag even if it was originally an annotated tag. This causes git describe to break which also causes tools like snapcraft's versioning to break.
  • Loading branch information
kian99 committed May 23, 2024
1 parent 4ba7857 commit 9fa9f2a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 192 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/charm-build.yaml

This file was deleted.

79 changes: 0 additions & 79 deletions .github/workflows/charm-release.yaml

This file was deleted.

84 changes: 0 additions & 84 deletions .github/workflows/charm-test.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/jaas-snap-release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release jimmctl snap
name: Release jaas snap

on:
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Publish the OCI image to ghcr
name: Publish image
name: Publish server image

on:
# Note that when running via workflow_dispatch, the github.ref_name
Expand All @@ -15,6 +15,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git fetch --tags --force origin # https://github.com/actions/checkout/issues/882 & https://github.com/actions/checkout/issues/290

- name: Log in to the Container registry
uses: docker/login-action@v3
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/snap-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ jobs:
with:
fetch-depth: 0
fetch-tags: true
- name: scripts
- run: git fetch --tags --force origin # https://github.com/actions/checkout/issues/882 & https://github.com/actions/checkout/issues/290
- name: Setup snap to build
run: |
mkdir -p ./snap
cp ./snaps/${{ inputs.folder }}/snapcraft.yaml ./snap/
- uses: snapcore/action-build@v1
id: snapcraft
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.snapcraft.outputs.snap }}
path: ${{ steps.snapcraft.outputs.snap }}
Expand All @@ -39,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ${{needs.build.outputs.snap}}
- uses: snapcore/action-publish@v1
Expand Down

0 comments on commit 9fa9f2a

Please sign in to comment.