From 489a1390e114e9fd7e33a4659991786f08d6e00c Mon Sep 17 00:00:00 2001 From: Bart Lauret Date: Tue, 6 Oct 2020 10:32:51 +0200 Subject: [PATCH] Add GH Actions --- .github/workflows/zip-and-release.yml | 48 +++++++++++++++++++++++++++ .gitignore | 2 ++ repo.xml | 14 ++++++++ strings.txt | 2 +- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/zip-and-release.yml create mode 100644 .gitignore create mode 100644 repo.xml diff --git a/.github/workflows/zip-and-release.yml b/.github/workflows/zip-and-release.yml new file mode 100644 index 0000000..0efc68b --- /dev/null +++ b/.github/workflows/zip-and-release.yml @@ -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 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d77864a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.zip + diff --git a/repo.xml b/repo.xml new file mode 100644 index 0000000..7314707 --- /dev/null +++ b/repo.xml @@ -0,0 +1,14 @@ + +
+ BS2B +
+ + + BS2B + Bauer stereophonic-to-binaural DSP is designed to improve headphone listening of stereo audio records + Terual + https://github.com/terual/test/releases/download/3.4/test-3.4.zip + c1f44b844fd8d4d897963b8bc88fb5117af05566 test-3.4.zip + + +
diff --git a/strings.txt b/strings.txt index f856232..0db7f33 100644 --- a/strings.txt +++ b/strings.txt @@ -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