@@ -64,35 +64,17 @@ jobs:
6464 docker buildx imagetools inspect ghcr.io/fluxcd/source-controller:${{ steps.prep.outputs.VERSION }}
6565 docker pull docker.io/fluxcd/source-controller:${{ steps.prep.outputs.VERSION }}
6666 docker pull ghcr.io/fluxcd/source-controller:${{ steps.prep.outputs.VERSION }}
67- - name : Generate release asset
68- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
67+ - name : Generate release manifests
6968 run : |
70- mkdir -p config/release
71- cp config/default/* config/release
72- cd config/release
73- kustomize edit set image fluxcd/source-controller=fluxcd/source-controller:${{ steps.get_version.outputs.VERSION }}
74- kustomize build . > source-controller.yaml
69+ mkdir -p bin/release
70+ kustomize build ./config/crd > ./bin/release/source-controller.crds.yaml
71+ kustomize build ./config/manager > ./bin/release/source-controller.deployment.yaml
7572 - name : Create release
76- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
77- id : create_release
78- uses : actions/create-release@latest
79- env :
80- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
73+ uses : ncipollo/release-action@v1
8174 with :
82- tag_name : ${{ github.ref }}
83- release_name : ${{ github.ref }}
84- draft : false
8575 prerelease : true
76+ artifacts : " bin/release/*.yaml"
77+ artifactContentType : " text/plain"
8678 body : |
8779 [CHANGELOG](https://github.com/fluxcd/source-controller/blob/main/CHANGELOG.md)
88- - name : Upload artifacts
89- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
90- id : upload-release-asset
91- uses : actions/upload-release-asset@v1
92- env :
93- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94- with :
95- upload_url : ${{ steps.create_release.outputs.upload_url }}
96- asset_path : ./config/release/source-controller.yaml
97- asset_name : source-controller.yaml
98- asset_content_type : text/plain
80+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments