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