Skip to content

Commit

Permalink
GHA: ensure nightly tag has a branch (#5262)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/414730916066338/1208730920240537/f

### Description
When creating a tag, we weren’t checking out the develop branch. This is
because action/checkout doesn’t check a branch out, but the latest
commit.

### Steps to test this PR

https://github.com/duckduckgo/Android/actions/runs/11768521519/job/32778443538
  • Loading branch information
malmstein authored Nov 12, 2024
1 parent 8fa20a0 commit 1d0f8ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Get latest tag
id: get_latest_tag
run: |
output=$(git describe --tags --abbrev=0)
run: |
output=$(git for-each-ref --sort=taggerdate --format='%(refname:short)' refs/tags | tail -n 1)
echo "Latest tag: $output"
echo "latest_tag=$output" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -103,6 +103,7 @@ jobs:
- name: Tag Nightly release
id: tag_nightly_release
run: |
git checkout develop
git tag -a ${{ steps.generate_version_name.outputs.version }} -m "Create tag ${{ steps.generate_version_name.outputs.version }} for nightly release."
git push origin ${{ steps.generate_version_name.outputs.version }}
Expand Down

0 comments on commit 1d0f8ac

Please sign in to comment.