-
Notifications
You must be signed in to change notification settings - Fork 52
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 #565 from 10up/enhancement/412
Updated release GH action workflow files.
- Loading branch information
Showing
3 changed files
with
72 additions
and
35 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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
name: Build release zip | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_zip: | ||
name: New release | ||
name: Build release zip | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create ZIP | ||
- name: Set Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
- name: npm install and build | ||
run: | | ||
git archive --prefix=classifai/ HEAD -o classifai.zip | ||
- name: Upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
npm install | ||
npm run build | ||
npm run makepot | ||
composer install --no-dev | ||
npm run archive | ||
- name: Upload the ZIP file as an artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{github.workspace}}/classifai.zip | ||
asset_name: classifai.zip | ||
asset_content_type: application/zip | ||
name: ${{ github.event.repository.name }} | ||
path: release | ||
retention-days: 2 |
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 |
---|---|---|
@@ -1,38 +1,36 @@ | ||
name: Build Release | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Push (merge) to trunk | ||
name: New release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: npm install and build | ||
node-version-file: .nvmrc | ||
|
||
- name: Install dependencies, build files and archive | ||
run: | | ||
npm install | ||
npm run build | ||
npm run makepot | ||
composer install --no-dev | ||
npm run archive | ||
- name: Release to Stable | ||
uses: s0/git-publish-subdir-action@develop | ||
- name: Upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
REPO: self | ||
BRANCH: stable | ||
FOLDER: release | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MESSAGE: 'Release: ({sha}) {msg}' | ||
- name: Build docs | ||
run: npm run build:docs | ||
- name: Deploy docs update | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: './docs' | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{github.workspace}}/classifai.zip | ||
asset_name: classifai.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,38 @@ | ||
name: Release to Stable | ||
on: | ||
push: | ||
branches: | ||
- trunk | ||
jobs: | ||
release: | ||
name: Push (merge) to trunk | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: npm install and build | ||
run: | | ||
npm install | ||
npm run build | ||
npm run makepot | ||
composer install --no-dev | ||
npm run archive | ||
- name: Release to Stable | ||
uses: s0/git-publish-subdir-action@develop | ||
env: | ||
REPO: self | ||
BRANCH: stable | ||
FOLDER: release | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MESSAGE: 'Release: ({sha}) {msg}' | ||
- name: Build docs | ||
run: npm run build:docs | ||
- name: Deploy docs update | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: './docs' |