Merge pull request #3372 from lbryio/release_process_fixup

github release process fixes
This commit is contained in:
Lex Berezhny 2021-07-26 15:58:10 -04:00 committed by GitHub
commit 35c2b34564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 19 deletions

View file

@ -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/}

View file

@ -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 }}}'

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"):
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()