forked from moodlehq/moodle-plugin-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.42 KB
/
release.yml
File metadata and controls
47 lines (40 loc) · 1.42 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
name: Create Release
on:
push:
tags: [ '*' ]
jobs:
release:
name: Create Release
runs-on: ubuntu-18.04
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup PHP 7.3
uses: shivammathur/setup-php@v2
with:
php-version: 7.3
ini-values: phar.readonly = false
- name: Build PHAR
run: |
make build
php build/moodle-plugin-ci.phar list
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token does not need to be defined, it is available by default.
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Take a look at the [CHANGELOG](https://moodlehq.github.io/moodle-plugin-ci/CHANGELOG.html) for details about the release.
Please follow [3.0 Upgrade guide](https://moodlehq.github.io/moodle-plugin-ci/UPGRADE-3.0.html) when upgrading from 2.x.
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/moodle-plugin-ci.phar
asset_name: moodle-plugin-ci.phar
asset_content_type: application/zip