diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86c9be008..5eca11e08 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -147,22 +147,17 @@ jobs: steps: - uses: actions/checkout@v1 - uses: actions/download-artifact@v2 - - name: zip binaries + - name: upload binaries + env: + GITHUB_TOKEN: ${{ github.token }} run: | + pip install githubrelease chmod +x lbrynet-macos/lbrynet chmod +x lbrynet-linux/lbrynet zip --junk-paths lbrynet-mac.zip lbrynet-macos/lbrynet zip --junk-paths lbrynet-linux.zip lbrynet-linux/lbrynet zip --junk-paths lbrynet-windows.zip lbrynet-windows/lbrynet.exe ls -lh - - name: upload binaries & publish - uses: softprops/action-gh-release@v1 - with: - draft: false - files: | - lbrynet-mac.zip - lbrynet-linux.zip - lbrynet-windows.zip - fail_on_unmatched_files: true - env: - GITHUB_TOKEN: ${{ github.token }} + githubrelease --no-progress asset lbryio/lbry-sdk upload ${GITHUB_REF#refs/tags/} \ + lbrynet-mac.zip lbrynet-linux.zip lbrynet-windows.zip + githubrelease --no-progress release lbryio/lbry-sdk publish ${GITHUB_REF#refs/tags/} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f94c3652e..3a46675dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,5 @@ name: slack + on: release: types: [published] @@ -8,10 +9,14 @@ jobs: name: "slack notification" runs-on: ubuntu-latest steps: - - name: send message - uses: slackapi/slack-github-action@v1.14.0 + - uses: LoveToKnow/slackify-markdown-action@v1.0.0 + id: markdown with: - payload: '{"type": "mrkdwn", "text":"Hello, *World*!"}' + text: "There is a new SDK release: ${{github.event.release.html_url}}\n${{ github.event.release.body }}" + - uses: slackapi/slack-github-action@v1.14.0 env: + CHANGELOG: ${{ toJSON(steps.markdown.outputs.text) }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_BOT_WEBHOOK }} + with: + payload: '{"type": "mrkdwn", "text": ${{ env.CHANGELOG }}}' diff --git a/scripts/release.py b/scripts/release.py index 539910fa2..6a217807e 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -151,19 +151,21 @@ def release(args): for pr in gh.search_issues(f"merged:>={previous_release._json_data['created_at']} repo:lbryio/lbry-sdk"): area_labels = list(get_labels(pr, 'area')) type_label = get_label(pr, 'type') + pr_url = f'[#{pr.number}]({pr.html_url})' + user_url = f'[{pr.user["login"]}]({pr.user["html_url"]})' if area_labels and type_label: for area_name in area_labels: for incompat in get_backwards_incompatible(pr.body or ""): - incompats.append(f' * [{area_name}] {incompat.strip()} ({pr.html_url})') + incompats.append(f' * [{area_name}] {incompat.strip()} ({pr_url})') for release_text in get_release_text(pr.body or ""): release_texts.append(release_text) if type_label == 'fixup': - fixups.append(f' * {pr.title} ({pr.html_url}) by {pr.user["login"]}') + fixups.append(f' * {pr.title} ({pr_url}) by {user_url}') else: area = areas.setdefault(area_name, []) - area.append(f' * [{type_label}] {pr.title} ({pr.html_url}) by {pr.user["login"]}') + area.append(f' * [{type_label}] {pr.title} ({pr_url}) by {user_url}') else: - unlabeled.append(f' * {pr.title} ({pr.html_url}) by {pr.user["login"]}') + unlabeled.append(f' * {pr.title} ({pr_url}) by {user_url}') area_names = list(areas.keys()) area_names.sort()