bloock_publish #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |