fixes for release process

This commit is contained in:
Lex Berezhny 2021-07-23 15:23:38 -04:00
parent 6b3261aa33
commit ef2e048efc
3 changed files with 21 additions and 19 deletions

View file

@ -147,22 +147,17 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
- name: zip binaries - name: upload binaries
env:
GITHUB_TOKEN: ${{ github.token }}
run: | run: |
pip install githubrelease
chmod +x lbrynet-macos/lbrynet chmod +x lbrynet-macos/lbrynet
chmod +x lbrynet-linux/lbrynet chmod +x lbrynet-linux/lbrynet
zip --junk-paths lbrynet-mac.zip lbrynet-macos/lbrynet zip --junk-paths lbrynet-mac.zip lbrynet-macos/lbrynet
zip --junk-paths lbrynet-linux.zip lbrynet-linux/lbrynet zip --junk-paths lbrynet-linux.zip lbrynet-linux/lbrynet
zip --junk-paths lbrynet-windows.zip lbrynet-windows/lbrynet.exe zip --junk-paths lbrynet-windows.zip lbrynet-windows/lbrynet.exe
ls -lh ls -lh
- name: upload binaries & publish githubrelease --no-progress asset lbryio/lbry-sdk upload ${GITHUB_REF#refs/tags/} \
uses: softprops/action-gh-release@v1 lbrynet-mac.zip lbrynet-linux.zip lbrynet-windows.zip
with: githubrelease --no-progress release lbryio/lbry-sdk publish ${GITHUB_REF#refs/tags/}
draft: false
files: |
lbrynet-mac.zip
lbrynet-linux.zip
lbrynet-windows.zip
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ github.token }}

View file

@ -1,4 +1,5 @@
name: slack name: slack
on: on:
release: release:
types: [published] types: [published]
@ -8,10 +9,14 @@ jobs:
name: "slack notification" name: "slack notification"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: send message - uses: LoveToKnow/slackify-markdown-action@v1.0.0
uses: slackapi/slack-github-action@v1.14.0 id: markdown
with: 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: env:
CHANGELOG: ${{ toJSON(steps.markdown.outputs.text) }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_BOT_WEBHOOK }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_BOT_WEBHOOK }}
with:
payload: '{"type": "mrkdwn", "text": ${{ env.CHANGELOG }}}'

View file

@ -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"): 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')) area_labels = list(get_labels(pr, 'area'))
type_label = get_label(pr, 'type') 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: if area_labels and type_label:
for area_name in area_labels: for area_name in area_labels:
for incompat in get_backwards_incompatible(pr.body or ""): 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 ""): for release_text in get_release_text(pr.body or ""):
release_texts.append(release_text) release_texts.append(release_text)
if type_label == 'fixup': 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: else:
area = areas.setdefault(area_name, []) 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: 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 = list(areas.keys())
area_names.sort() area_names.sort()