Skip to content

Commit

Permalink
Merge branch 'hotfix-1.1.14' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Mar 27, 2023
2 parents 2d270f5 + e3e822f commit 07f57ea
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 88 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
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 }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.1.14

* Convert to github actions for publishing

## 1.1.13

* [#15](https://github.com/pixl8/preside-ext-calendar-view/issues/15) Upgrade moment.js
Expand Down
4 changes: 2 additions & 2 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name":"PresideCMS Extension: Calendar View",
"type":"preside-extensions",
"version":"VERSION_NUMBER",
"location":"https://s3.eu-west-2.amazonaws.com/pixl8-public-packages/calendar-view/DOWNLOAD_LOCATION",
"version":"$VERSION_NUMBER",
"location":"$DOWNLOAD_URL",
"private":false,
"author":"Pixl8 Interactive",
"directory":"application/extensions",
Expand Down
65 changes: 0 additions & 65 deletions buildDeployAndPublish.sh

This file was deleted.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"id" : "preside-ext-calendar-view"
, "title" : "Calendar View"
, "author" : "Pixl8 Interactive"
, "version" : "VERSION_NUMBER"
, "version" : "$VERSION_NUMBER"
}

0 comments on commit 07f57ea

Please sign in to comment.