forked from JoeMatt/AltSign
-
Notifications
You must be signed in to change notification settings - Fork 10
84 lines (74 loc) · 2.56 KB
/
create-release.yml
File metadata and controls
84 lines (74 loc) · 2.56 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Create Release
# Create XCFramework when a version is tagged
on:
push:
tags:
- 'v*'
jobs:
create_release:
name: Create Release
runs-on: macos-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Create XCFramework
uses: unsignedapps/swift-create-xcframework@v2
# Create a zip file of the XCFramework
- name: Create ZIP
run: |
zip -r ${{ steps.create_xcframework.outputs.xcframework_name }} ${{ steps.create_xcframework.outputs.xcframework_path }}
- name: Create Changelog
# Create a changelog
uses: unsignedapps/swift-create-changelog@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create a release
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changelog:
${{ steps.changelog.outputs.changelog }}
draft: true
prerelease: ${{ github.tag_name.contains('beta') }}
# Upload the XCFramework ZIP to the release
- name: Upload XCFramework
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.create_zip.outputs.xcframework_path }}
asset_name: ${{ steps.create_zip.outputs.xcframework_name }}
asset_content_type: application/zip
# Upload the changelog to the release
- name: Upload Changelog
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.changelog.outputs.changelog_path }}
asset_name: Changelog.md
asset_content_type: text/markdown
# Notify Discord
- name: Discord Notify
uses: stegzilla/discord-notify@v4
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: New SideKit release created
message: |
A new release has been created: ${{ github.ref }}
Changelog:
${{ steps.changelog.outputs.changelog }}
XCFramework Zip:
${{ steps.create_zip.outputs.xcframework_name }}
include_image: true
username: GitHub Actions
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png