-
-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (52 loc) · 2.3 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
57
58
59
60
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
id: build
uses: gocom/action-textpattern-package-plugin@master
- name: Changelog
id: changelog
run: |
contents="$(sed -e '1,/h2. Changelog/d' README.textile | sed -e '1,/h3./d' -e '/h3./,$d')"
contents="${contents//'%'/'%25'}"
contents="${contents//$'\n'/'%0A'}"
contents="${contents//$'\r'/'%0D'}"
echo "::set-output name=contents::$contents"
- name: Create Release
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.changelog.outputs.contents }}
draft: false
prerelease: false
- name: Upload Compressed Plugin Installer
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ steps.build.outputs.compressed }}
asset_name: ${{ steps.build.outputs.name }}_v${{ steps.build.outputs.version }}_zip.txt
asset_content_type: text/plain
- name: Upload Uncompressed Plugin Installer
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ steps.build.outputs.uncompressed }}
asset_name: ${{ steps.build.outputs.name }}_v${{ steps.build.outputs.version }}.txt
asset_content_type: text/plain