-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 2.06 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:
create:
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl, posix
ini-values: memory_limit=256M, max_execution_time=0, phar.readonly=0
tools: pecl
- name: Build project
run: |
bin/compile
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Phar Asset
id: upload-release-phar-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./somnambulist-project-manager.phar
asset_name: somnambulist-project-manager.phar
asset_content_type: application/octet-stream
- name: Upload Release Checksums Asset
id: upload-release-checksum-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./somnambulist-project-manager_checksums.txt
asset_name: somnambulist-project-manager_checksums.txt
asset_content_type: text/plain
- name: Trigger homebrew update
run: |
curl -X POST https://api.github.com/repos/somnambulist-tech/homebrew-somnambulist/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.ACTIONS_KEY }} \
--data '{"event_type": "update-packages", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'