Skip to content

Release

Release #23

Workflow file for this run

name: Release
on:
push:
tags:
- "v1.*.*"
workflow_dispatch:
permissions:
contents: write # required for uploading releases
env:
DEFAULT_GO_VERSION: ^1.21.5
NTH_RELEASE_MODE: ${{ github.event_name == "push" && "prod" || "test" }}

Check failure on line 14 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 14, Col: 21): Unexpected symbol: '"push"'. Located at position 22 within expression: github.event_name == "push" && "prod" || "test" .github/workflows/release.yaml (Line: 38, Col: 29): Unexpected symbol: '"prod"'. Located at position 25 within expression: env.NTH_RELEASE_MODE == "prod" && "release" || "release-test"
GITHUB_USERNAME: ${{ secrets.EC2_BOT_GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.EC2_BOT_GITHUB_TOKEN }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
jobs:
releaseLinux:
name: Release Linux
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Release Linux Assets
run: make $NTH_RELEASE_TARGET
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
NTH_RELEASE_TARGET: ${{ env.NTH_RELEASE_MODE == "prod" && "release" || "release-test" }}
releaseWindows:
name: Release Windows
runs-on: windows-2019
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Release Windows Assets
run: |
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
choco install make && choco install zip && make $Env:NTH_RELEASE_TARGET
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
NTH_RELEASE_TARGET: ${{ env.NTH_RELEASE_MODE == "prod" && "release-windows" || "release-windows-test" }}
release:
name: Release
if: ${{ env.NTH_RELEASE_MODE == "prod" }}
runs-on: ubuntu-20.04
needs: [releaseLinux, releaseWindows]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Sync Helm Chart Catalog information
run: make sync-catalog-information-for-helm-chart
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
- name: Sync Helm Chart to ECR Public
run: make push-helm-chart
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
- name: Sync Readme to ECR Public
run: make sync-readme-to-ecr-public
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}