Skip to content

Commit

Permalink
Merge tag and release GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Dec 5, 2022
1 parent 3c03bb9 commit 1edfb50
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/release.yaml

This file was deleted.

30 changes: 26 additions & 4 deletions .github/workflows/tag-release.yml
Expand Up @@ -9,17 +9,39 @@ on:
- version.txt

jobs:
tag-release:
tag:
if: ${{ github.repository == 'kubernetes/cloud-provider-aws' }}
runs-on: ubuntu-20.04

runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: /usr/bin/git config --global user.email actions@github.com
- run: /usr/bin/git config --global user.name 'GitHub Actions Release Tagger'
- run: hack/tag-release.sh
id: tag_release
outputs:
release_tag: ${{ steps.tag_release.outputs.release_tag }}

release:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.tag.outputs.release_tag }}
release_name: ${{ needs.tag.outputs.release_tag }}
body: |
AWS Cloud Provider
The cloud provider now runs out-of-tree in a new component called aws-cloud-controller-manager.
The external provider preserves all existing behavior/functionality from the legacy in-tree provider.
## CHANGELOG
See [CHANGELOG](https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/CHANGELOG.md) for full list of changes.
draft: false
prerelease: false
4 changes: 3 additions & 1 deletion hack/tag-release.sh
Expand Up @@ -23,8 +23,10 @@ fi

if [ "$(git tag -l "v${VERSION}")" ]; then
echo "Tag v${VERSION} already exists"
exit 0
exit 1
fi

git tag -a -m "Release ${VERSION}" "v${VERSION}"
git push origin "v${VERSION}"

echo "release_tag=refs/tags/v${VERSION}" >> $GITHUB_OUTPUT

0 comments on commit 1edfb50

Please sign in to comment.