Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
release: derive release version from git branch (#4498)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Jun 24, 2021
1 parent 17ad4cb commit e6c160c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: set env
run: |
export CURRENT_BRANCH=$(git branch --show-current)
echo "RELEASE_VERSION=${CURRENT_BRANCH:8}" >> $GITHUB_ENV # release-v1.0.0 substring starting at v1.0.0
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
- name: Validate CHANGELOG # We require a pre-existing CHANGELOG specific for this release in order to proceed
run: |
[ -s releases/CHANGELOG-${{ github.ref }}.md ]
[ -s releases/CHANGELOG-${{ env.RELEASE_VERSION }}.md ]
- name: Install go
uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -122,6 +126,6 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: _dist/aks-engine*-*-*.*
body_path: releases/CHANGELOG-${{ github.ref }}.md
body_path: releases/CHANGELOG-${{ env.RELEASE_VERSION }}.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1 comment on commit e6c160c

@gifhuppp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release: derive release version from git branch (#4498)

Please sign in to comment.