-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #560 from plotly/github-actions-auto-release
Add automation to automatically release zipped apps
- Loading branch information
Showing
2 changed files
with
60 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,44 @@ | ||
# https://github.com/actions/upload-release-asset/issues/28#issuecomment-617208601 | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: Release and upload apps | ||
|
||
jobs: | ||
build: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
- name: Bump version and push tag | ||
id: version_bump | ||
uses: anothrNick/github-tag-action@1.34.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
- name: Compress apps | ||
run: | | ||
cd ./apps; | ||
for f in */; do | ||
echo "Zipping ${f}..."; | ||
zip -qr "${f%/*}" "${f}"*; | ||
done | ||
cd -; | ||
- name: Create release and upload zipped apps | ||
run: | | ||
cd ./apps; | ||
set -x | ||
assets=() | ||
for asset in ./*.zip; do | ||
assets+=("-a" "$asset") | ||
done | ||
hub release create "${assets[@]}" -m "Release ${RELEASE_TAG}" "${RELEASE_TAG}" | ||
cd -; | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_TAG: ${{ steps.version_bump.outputs.new_tag }} |
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