Preparing for v3.0.3 #17
Workflow file for this run
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
name: Create Release Archive | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set filename | |
id: vars | |
run: | | |
echo "zip_file_name=drawio-${GITHUB_REF##*/}.zip" >> $GITHUB_OUTPUT | |
echo "tar_file_name=drawio-${GITHUB_REF##*/}.tar.gz" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v3 | |
with: | |
path: drawio | |
- name: Archive Release (zip) | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'zip' | |
filename: ${{ steps.vars.outputs.zip_file_name }} | |
path: drawio | |
exclusions: '*.git* .tx/* screenshots/* src/* package* webpack.config.js' | |
- name: Archive Release (tar.gz) | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'tar' | |
filename: ${{ steps.vars.outputs.tar_file_name }} | |
path: drawio | |
exclusions: '*.git* .tx/* screenshots/* src/* package* webpack.config.js' | |
- name: Upload Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ${{ steps.vars.outputs.zip_file_name }},${{ steps.vars.outputs.tar_file_name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload App Release | |
run: | | |
sleep 60 | |
echo "${{ secrets.NEXTCLOUD_KEY }}" > drawio.key | |
export signature=`openssl dgst -sha512 -sign drawio.key ${{ steps.vars.outputs.tar_file_name }} | openssl base64` | |
export requestJSON="{\"download\":\"https://github.com/jgraph/drawio-nextcloud/releases/download/${GITHUB_REF##*/}/drawio-${GITHUB_REF##*/}.tar.gz\", \"signature\": \"${signature//$'\n'/\\n}\"}" | |
curl -X POST https://apps.nextcloud.com/api/v1/apps/releases -H "Authorization: Token ${{ secrets.NEXTCLOUD_TOKEN }}" -H "Content-Type: application/json" -d "${requestJSON}" |