Skip to content

Commit

Permalink
update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ggogel committed Aug 30, 2023
1 parent 5c5759e commit a642bf2
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/release-maubot-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install zip jq
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Extract version from maubot.yaml
run: |
Expand All @@ -32,16 +33,11 @@ jobs:
if: env.RELEASE_EXIST == 'false'
run: |
CHANGELOG=$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"- %s" -- base-config.yaml maubot.yaml socialmediadownload.py instaloader/)
echo "CHANGELOG=$CHANGELOG"
echo "CHANGELOG=$CHANGELOG" >> $GITHUB_ENV
- name: Zip files and dependencies, then rename to mbp
if: env.RELEASE_EXIST == 'false'
run: |
zip -r plugin.zip base-config.yaml maubot.yaml socialmediadownload.py instaloader/
mv plugin.zip plugin.mbp
echo "CHANGELOG=$(echo "$CHANGELOG" | base64)"
echo "CHANGELOG=$(echo "$CHANGELOG" | base64)" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
if: env.RELEASE_EXIST == 'false'
uses: actions/create-release@v1
with:
Expand All @@ -50,12 +46,3 @@ jobs:
body: ${{ env.CHANGELOG }}
draft: false
prerelease: false

- name: Upload Release Asset
if: env.RELEASE_EXIST == 'false'
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./plugin.mbp
asset_name: plugin.mbp
asset_content_type: application/zip

0 comments on commit a642bf2

Please sign in to comment.