Skip to content

release: Update v0.81.0 CHANGELOG (#279) #29

release: Update v0.81.0 CHANGELOG (#279)

release: Update v0.81.0 CHANGELOG (#279) #29

Workflow file for this run

name: Release
on:
push:
branches:
- release-*
paths:
- 'releases/CHANGELOG*.md'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: Validate tag does not already exist
run: |
if [[ $(git tag -l ${{ env.RELEASE_VERSION }}) ]]; then
exit 1
fi
- 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-${{ env.RELEASE_VERSION }}.md ]
- name: Install go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- name: Install helm
run: |
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
- name: Install k
run: |
sudo curl -o /usr/local/bin/k https://raw.githubusercontent.com/jakepearson/k/master/k
sudo chmod +x /usr/local/bin/k
- name: Build aks-engine-azurestack binary
run: sudo make build-binary
- name: print git status after build
run: |
git status
- name: Remove untracked files created during workflow steps
run: git ls-files --others --exclude-standard -z | xargs -0 -r rm
- name: Add local tag
run: git tag ${{ env.RELEASE_VERSION }}
- name: print and validate git status before producing binaries
run: |
git status
git status | grep 'working tree clean'
- name: clean all unstaged changes
run: |
git checkout -- .
- name: Build Artifacts
run: |
sudo make dist
- name: Remove local tag
run: git tag -d ${{ env.RELEASE_VERSION }}
- name: Publish Release
uses: ncipollo/release-action@v1
with:
artifacts: _dist/aks-engine-azurestack*-*-*.*
bodyFile: releases/CHANGELOG-${{ env.RELEASE_VERSION }}.md
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.RELEASE_VERSION }}
commit: release-${{ env.RELEASE_VERSION }}
prerelease: true