Update README.md #125
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Orchest | |
# Only trigger when a PR to master is closed (this can also mean closed | |
# but not merged). | |
on: | |
pull_request: | |
branches: | |
- master | |
types: [closed] | |
jobs: | |
build_manifests: | |
# On a successful merge of a release branch into the master branch. | |
# NOTE: In github action expressions you need to use single quotes. | |
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }} | |
runs-on: ubuntu-latest | |
outputs: | |
release_version: ${{ steps.release_version.outputs.release_version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ">=1.19.0" | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y make | |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | |
chmod 700 get_helm.sh | |
./get_helm.sh -v v3.9.0 | |
- name: Get release version | |
id: release_version | |
run: | | |
export RELEASE_VERSION=$(echo ${{ github.head_ref }} | sed 's/release\///g') | |
echo ::set-output name=release_version::$RELEASE_VERSION | |
- name: Build release | |
id: build | |
run: | | |
TAGNAME=${RELEASE_VERSION} make -C ./services/orchest-controller manifestgen | |
env: | |
RELEASE_VERSION: ${{steps.release_version.outputs.release_version}} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: manifests | |
path: ./services/orchest-controller/deploy/k8s | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: examples | |
path: ./services/orchest-controller/deploy/examples/example-orchestcluster.yaml | |
trigger_release: | |
needs: [build_manifests] | |
# On a successful merge of a release branch into the master branch. | |
# NOTE: In github action expressions you need to use single quotes. | |
if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
- name: Create new release with auto-generated release notes | |
env: | |
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} | |
RELEASE_VERSION: ${{ needs.build_manifests.outputs.release_version }} | |
DEBUG: api | |
run: | | |
gh release create ${RELEASE_VERSION} --generate-notes ./manifests/* ./examples/* |