-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.48 KB
/
cd-create-release.yml
File metadata and controls
51 lines (44 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Create release
on:
workflow_call:
inputs:
deploy-package-path:
required: true
type: string
create-deployment-package-command:
required: true
type: string
secrets:
GITHUB_CONTAINER_REGISTRY_TOKEN:
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Set bash deployment variables
id: vars
run: |
echo "DEPLOY_PACKAGE_PATH=${{ inputs.deploy-package-path }}" >> $GITHUB_ENV
echo "CREATE_DEPLOYMENT_PACKAGE_COMMAND=${{ inputs.create-deployment-package-command }}" >> $GITHUB_ENV
- name: Process project into package for deployment
run: |
echo "Processing project for deployment..."
eval $CREATE_DEPLOYMENT_PACKAGE_COMMAND
echo "Deployment package created at: $DEPLOY_PACKAGE_PATH"
- name: Upload deployment package
uses: actions/upload-artifact@v4.1.0
with:
name: deployment-package
path: ${{ inputs.deploy-package-path }}
- name: Create release
uses: softprops/action-gh-release@v2.3.2
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
files: ${{ inputs.deploy-package-path }}
generate_release_notes: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_CONTAINER_REGISTRY_TOKEN }}