-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (26 loc) · 1.4 KB
/
publish.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
name: Publish
on:
repository_dispatch:
types: [bloock_publish]
jobs:
publish:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
with:
path: bloock_lib_go
- run: |
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/octet-stream" $(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/bloock/bloock-sdk/releases/tags/v${{ github.event.client_payload.version }} | jq -r '.assets[] | select(.name == "bloock_lib_go-${{ github.event.client_payload.version }}.zip") | .url') --output bloock_lib_go-${{ github.event.client_payload.version }}.zip
- run: unzip bloock_lib_go-${{ github.event.client_payload.version }}.zip -d bloock_lib_go-${{ github.event.client_payload.version }}
- run: find bloock_lib_go/* -not -path './.git' -not -path './.git/*' -not -path './.github/*' -not -path './.github' -delete
- run: cp -r bloock_lib_go-${{ github.event.client_payload.version }}/bloock_lib_go/* bloock_lib_go/
- name: commit and tag
uses: EndBug/add-and-commit@v5
with:
author_name: "bloock"
message: "v${{ github.event.client_payload.version }}"
cwd: bloock_lib_go
add: ". --no-ignore-removal"
tag: "v${{ github.event.client_payload.version }} --force"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}