-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.72 KB
/
Copy pathcreate_release.yml
File metadata and controls
45 lines (43 loc) · 1.72 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
name: Create Release
on:
pull_request:
types: closed
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.merged && startsWith(github.head_ref, 'RC')
steps:
- uses: actions/checkout@v2-beta
with:
ref: 'master'
- name: Set global git conf
run: git config --global user.email "" && git config --global user.name "github-actions"
- name: Tag and prepare release
id: tag_and_prepare_release
uses: K-Phoen/semver-release-action@master
with:
release_branch: master
release_strategy: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push tag to GitHub
run: git tag -a ${{ steps.tag_and_prepare_release.outputs.tag }} -m "Pre release" && git push origin ${{ steps.tag_and_prepare_release.outputs.tag }}
- name: Create release on tag
if: steps.tag_and_prepare_release.outputs.tag
uses: serucee/github-create-release-action@master
with:
created_tag: ${{ steps.tag_and_prepare_release.outputs.tag }}
release_title: repository ${{steps.tag_and_prepare_release.outputs.tag}} # Replace repository with the desired name
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release package
uses: serucee/php-artifact-action@master
- name: Upload release package
id: upload_release_assets
uses: svenstaro/upload-release-action@1.0.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifact.zip
asset_name: my-artifact.zip # Replace with expected asset name for web view
tag: ${{ steps.tag_and_prepare_release.outputs.tag }}
overwrite: true