Skip to content

Commit

Permalink
Merge pull request #43 from microsoft/user/lemccomb/tagfix2
Browse files Browse the repository at this point in the history
User/lemccomb/tagfix2
  • Loading branch information
lemccomb authored Sep 28, 2023
2 parents 1736a26 + 92d2a21 commit ec0cf1e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
tag_name: ${{ steps.output_tag_name.outputs.tag_name }}
steps:

# Checkout the main branch and fetch tags.
Expand Down Expand Up @@ -167,17 +168,17 @@ jobs:
# Always use prerelease for automated releases. Official releases are created manually.
prerelease: true

# Delete the "main" tag if there is one. This is a hack until we figure out what is causing a "main" tag to be created.
- name: Delete main tag
if: ${{ github.event_name == 'push' }}
# Output the semver tag if it's a push event, or the most recent tag if it's a release event.
- name: Output tag name
id: output_tag_name
run: |
git tag -d main || true
#git push origin :main

# Handle the release case.
- name: Handle release
if: ${{ github.event_name == 'release' }}
run: echo "A release was manually created. No action is needed."
if [ "${{ github.event_name }}" == "push" ]; then
echo "::set-output name=tag_name::${{ steps.semver-tag.outputs.semver_tag }}"
echo "Generated semver tag is ${{ steps.semver-tag.outputs.semver_tag }}."
else
echo "::set-output name=tag_name::${{ github.event.release.tag_name }}"
echo "Current release tag is ${{ github.event.release.tag_name }}."
fi
#### RELEASE EVENTS ####

Expand Down Expand Up @@ -237,4 +238,4 @@ jobs:
file: ./published/CoseSignTool-*.zip
file_glob: true
overwrite: true
#tag: ${{ needs.create_release.outputs.outputs.semver_tag }}
tag: ${{ needs.create_release.outputs.tag_name }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [main](https://github.com/microsoft/CoseSignTool/tree/main) (2023-09-28)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.8...main)

## [v0.3.1-pre.8](https://github.com/microsoft/CoseSignTool/tree/v0.3.1-pre.8) (2023-09-28)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.7...v0.3.1-pre.8)

**Merged pull requests:**

- don't specify tag to upload-release-action [\#42](https://github.com/microsoft/CoseSignTool/pull/42) ([lemccomb](https://github.com/lemccomb))

## [v0.3.1-pre.7](https://github.com/microsoft/CoseSignTool/tree/v0.3.1-pre.7) (2023-09-28)

[Full Changelog](https://github.com/microsoft/CoseSignTool/compare/v0.3.1-pre.6...v0.3.1-pre.7)
Expand Down

0 comments on commit ec0cf1e

Please sign in to comment.