-
Notifications
You must be signed in to change notification settings - Fork 2.2k
54 lines (52 loc) · 1.69 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
name: Release
on:
release:
types: [released]
jobs:
dispatch-plugins:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Parse checksum
id: parse_checksum
run: echo "checksum=$(grep -o '[a-fA-F0-9]\{64\}' Package.swift)" >> $GITHUB_OUTPUT
- name: Dispatch release of plugins package
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.SIMPLYDANNY_PLUGINS_SYNC }}
repository: SimplyDanny/SwiftLintPlugins
event-type: swiftlint-release
client-payload: |-
{
"title": "${{ github.event.release.name }}",
"tag": "${{ github.event.release.tag_name }}",
"checksum": "${{ steps.parse_checksum.outputs.checksum }}"
}
trigger-docker:
uses: ./.github/workflows/docker.yml
with:
tag: ${{ github.event.release.tag_name }}
secrets: inherit
upload-docker:
needs: trigger-docker
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Upload binary to existing release
run: make zip_linux_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-pod:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Retrieve author in uppercase
id: retrieve_author
run: |
AUTHOR=${{ github.event.release.author.login }}
echo "name=${AUTHOR@U}" >> $GITHUB_OUTPUT
- name: Deploy to CocoaPods
run: make pod_publish
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets[format('COCOAPODS_TRUNK_TOKEN_{0}', steps.retrieve_author.outputs.name)] }}