-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.92 KB
/
release.yml
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
52
53
54
55
56
name: Continuous Deployment/Release - Website
on:
workflow_run:
workflows: ["Continuous Integration - Website"]
types:
- completed
permissions: write-all
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.event.workflow_run.head_commit.message, '#build-for-review')
steps:
- name: Info
run: echo "Release Workflow - Website"
- name: Download files from ci
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
name: propromo.php
path: ./propromo.php/**
# - name: Create Artifact Directory
# run: mkdir -p propromo.php && find . -maxdepth 1 ! -name '.' ! -name 'propromo.php' -exec bash -c 'rm -rf propromo.php/{} && mv {} propromo.php/' \; # move all artifact files to propromo.php directory
- name: Zip artifact
run: |
zip -r propromo-website.zip propromo.php
tar -czvf propromo-website.tar.gz propromo.php
- name: Generate release tag
id: generate_release_tag
uses: amitsingh-007/[email protected]
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
tag_prefix: "v"
tag_template: "yyyy.mm.dd.i"
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GH_BOT_TOKEN }}
commit: ${{ github.event.workflow_run.head_sha }}
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}
name: Release ${{ github.event.workflow_run.head_sha }}
body: Release for commit '${{ github.event.workflow_run.head_commit.message }}'
draft: false
prerelease: true
makeLatest: true
files: |
propromo-website.zip
propromo-website.tar.gz