mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-10 01:37:29 +00:00
This commit changes the way the build of manifests is triggered by making smarter use of the capabilities of Make. The result should be that the manifests are only regenerated if: 1. There is no `cmd/flux/manifests/` directory. 2. There have been made changes to the YAML files in the `manifests/` directory that are newer than the files in `cmd/flux/manifests/`. Signed-off-by: Hidde Beydals <hello@hidde.co>
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags: [ 'v*' ]
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.16.x
|
|
- name: Download release notes utility
|
|
env:
|
|
GH_REL_URL: https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz
|
|
run: cd /tmp && curl -sSL ${GH_REL_URL} | tar xz && sudo mv github-release-notes /usr/local/bin/
|
|
- name: Generate release notes
|
|
run: |
|
|
echo 'CHANGELOG' > /tmp/release.txt
|
|
github-release-notes -org fluxcd -repo toolkit -since-latest-release -include-author >> /tmp/release.txt
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Setup Kustomize
|
|
uses: fluxcd/pkg//actions/kustomize@main
|
|
- name: Generate manifests
|
|
run: |
|
|
make cmd/flux/manifests
|
|
./manifests/scripts/bundle.sh ./output manifests.tar.gz
|
|
kustomize build ./manifests/install > ./output/install.yaml
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v1
|
|
with:
|
|
version: latest
|
|
args: release --release-notes=/tmp/release.txt --skip-validate
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
|
|
AUR_BOT_SSH_PRIVATE_KEY: ${{ secrets.AUR_BOT_SSH_PRIVATE_KEY }}
|