Skip to content

Commit

Permalink
Add GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
terual committed Oct 6, 2020
1 parent 2ecaa10 commit 489a139
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/zip-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Zip and release
on:
workflow_dispatch:
inputs:
version:
description: 'version'
required: true

jobs:
build:
name: Zip and release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Zip plugin and update repo.xml
run: |
zip -r ${{ github.event.repository.name }}-${{ github.event.inputs.version }}.zip . -x ".git/*" ".github/*" "repo.xml"
export SHA1SUM=`sha1sum "${{ github.event.repository.name }}-${{ github.event.inputs.version }}.zip" | awk '{ print $1 }'`
export ZIP_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.event.inputs.version }}/${{ github.event.repository.name }}-${{ github.event.inputs.version }}.zip"
python -c "from xml.etree import ElementTree as et; tree = et.parse('repo.xml'); tree.find('.//sha').text = '$SHA1SUM'; tree.find('.//url').text = '$ZIP_URL'; tree.write('repo.xml')"
- name: Commit changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git commit -a -m "Release ${{ github.event.inputs.version }}"
git push
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ github.event.repository.name }}-${{ github.event.inputs.version }}.zip
asset_name: ${{ github.event.repository.name }}-${{ github.event.inputs.version }}.zip
asset_content_type: application/zip

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.zip

14 changes: 14 additions & 0 deletions repo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<extensions>
<details>
<title lang="EN">BS2B</title>
</details>
<plugins>
<plugin maxTarget="8.*" minTarget="7.9" name="DSDPlayer" target="unix" version="3.2">
<title lang="EN">BS2B</title>
<desc lang="EN">Bauer stereophonic-to-binaural DSP is designed to improve headphone listening of stereo audio records</desc>
<creator>Terual</creator>
<url>https://github.com/terual/test/releases/download/3.4/test-3.4.zip</url>
<sha>c1f44b844fd8d4d897963b8bc88fb5117af05566 test-3.4.zip</sha>
</plugin>
</plugins>
</extensions>
2 changes: 1 addition & 1 deletion strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PLUGIN_BS2B
EN Bauer stereophonic-to-binaural DSP

PLUGIN_BS2B_DESC
EN Bauer stereophonic-to-binaural DSP: headphone filter
EN Bauer stereophonic-to-binaural DSP is designed to improve headphone listening of stereo audio records.

PLUGIN_BS2B_ENABLE
EN Enable Bauer stereophonic-to-binaural DSP for this player

0 comments on commit 489a139

Please sign in to comment.