-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix-1.1.14' into stable
- Loading branch information
Showing
6 changed files
with
103 additions
and
88 deletions.
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,96 @@ | ||
name: Continuous Integration | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
ci: | ||
name: CI for Preside Calendar View extension | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup flow variables | ||
run: | | ||
branch=${GITHUB_REF##*/} | ||
publish=false | ||
if [[ "{{ env.event.name }}" != "pull_request" ]] ; then | ||
if [[ $branch == release-* ]] || [[ $branch == v* ]] ; then | ||
publish=true | ||
fi | ||
fi | ||
echo "PUBLISH=$publish" >> $GITHUB_ENV | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
uses: pixl8/github-action-box-install@v2 | ||
|
||
- name: Generate release version number | ||
if: "env.PUBLISH == 'true'" | ||
id: versiongen | ||
uses: pixl8/github-action-twgit-release-version-generator@v1 | ||
|
||
- name: Inject version into box json | ||
if: "env.PUBLISH == 'true'" | ||
uses: dominicwatson/github-action-envsubst@v1 | ||
with: | ||
files: box.json manifest.json | ||
patterns: $VERSION_NUMBER | ||
env: | ||
VERSION_NUMBER: ${{ steps.versiongen.outputs.semver_release_string }} | ||
|
||
- name: Build static assets with grunt | ||
if: "env.PUBLISH == 'true'" | ||
shell: bash | ||
run: | | ||
cd assets && | ||
npm install && | ||
grunt && | ||
rm -rf node_modules | ||
- name: Zip project | ||
if: "env.PUBLISH == 'true'" | ||
run: zip -rq $ZIP_FILE * -x jmimemagic.log -x .* -x *.sh -x *.log -x tests/**\* | ||
shell: bash | ||
env: | ||
ZIP_FILE: ${{ steps.versiongen.outputs.semver_release_number }}.zip | ||
|
||
- name: Create Release | ||
if: "env.PUBLISH == 'true'" | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.versiongen.outputs.semver_release_string }} | ||
release_name: Release ${{ steps.versiongen.outputs.semver_release_string }} | ||
draft: false | ||
prerelease: ${{ steps.versiongen.outputs.semver_release_is_snapshot }} | ||
|
||
- name: Upload Release Asset | ||
if: "env.PUBLISH == 'true'" | ||
id: upload | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ${{ steps.versiongen.outputs.semver_release_number }}.zip | ||
asset_name: ${{ steps.versiongen.outputs.semver_release_number }}.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Inject download location | ||
if: "env.PUBLISH == 'true'" | ||
uses: DominicWatson/github-action-envsubst@stable | ||
with: | ||
files: box.json | ||
env: | ||
DOWNLOAD_URL: ${{ steps.upload.outputs.browser_download_url }} | ||
|
||
- name: Publish to forgebox | ||
if: "env.PUBLISH == 'true'" | ||
uses: pixl8/github-action-box-publish@v3 | ||
with: | ||
forgebox_user: ${{ secrets.FORGEBOX_USER }} | ||
forgebox_pass: ${{ secrets.FORGEBOX_PASS }} |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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