@@ -64,35 +64,17 @@ jobs:
64
64
docker buildx imagetools inspect ghcr.io/fluxcd/kustomize-controller:${{ steps.prep.outputs.VERSION }}
65
65
docker pull docker.io/fluxcd/kustomize-controller:${{ steps.prep.outputs.VERSION }}
66
66
docker pull ghcr.io/fluxcd/kustomize-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
69
68
run : |
70
- mkdir -p config/release
71
- cp config/default/* config/release
72
- cd config/release
73
- kustomize edit set image fluxcd/kustomize-controller=fluxcd/kustomize-controller:${{ steps.prep.outputs.VERSION }}
74
- kustomize build . > kustomize-controller.yaml
69
+ mkdir -p bin/release
70
+ kustomize build ./config/crd > ./bin/release/kustomize-controller.crds.yaml
71
+ kustomize build ./config/manager > ./bin/release/kustomize-controller.deployment.yaml
75
72
- 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
81
74
with :
82
- tag_name : ${{ github.ref }}
83
- release_name : ${{ github.ref }}
84
- draft : false
85
75
prerelease : true
76
+ artifacts : " bin/release/*.yaml"
77
+ artifactContentType : " text/plain"
86
78
body : |
87
79
[CHANGELOG](https://github.com/fluxcd/kustomize-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/kustomize-controller.yaml
97
- asset_name : kustomize-controller.yaml
98
- asset_content_type : text/plain
80
+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments