-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters