Skip to content

Commit

Permalink
Use softprops/action-gh-release to create releases
Browse files Browse the repository at this point in the history
Pushing a 'v*' tag automatically creates a release.

Signed-off-by: Dean Roehrich <[email protected]>
  • Loading branch information
roehrich-hpe committed Feb 13, 2024
1 parent a74d2fd commit bc91c65
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 41 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/handle_release_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Handle Release Tag

on:
push:
tags:
- 'v*'

jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true
fetch-depth: 0
- name: Repair tag
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
- name: Verify that the tag is annotated
run: if test x$(git for-each-ref ${{ github.ref }} | awk '{print $2}') = xtag; then /bin/true; else echo "\"${{ github.ref }}\" does not look like an annotated tag!"; /bin/false; fi
- name: Release
uses: softprops/action-gh-release@v1
with:
#prerelease: true
generate_release_notes: true

14 changes: 1 addition & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
name: Docker build and push

on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- 'master'
- 'releases/v*'
on: [push]

env:
# TEST_TARGET: Name of the testing target in the Dockerfile
Expand All @@ -18,9 +9,6 @@ env:
# DO_TEST - true to build and run unit tests, false to skip the tests
DO_TEST: true

# DO_PUSH - true to push to the HPE_DEPLOY_REPO, false to not push
DO_PUSH: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/verify_tag.yml

This file was deleted.

0 comments on commit bc91c65

Please sign in to comment.