This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
77 additions
and
85 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Release Stage Framework | ||
name: Create Stage Release | ||
|
||
jobs: | ||
build: | ||
|
@@ -15,14 +15,82 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# Composer action | ||
- uses: ./.github/actions/composer | ||
# Get Composer cache | ||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: | | ||
echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
# Yarn action | ||
- uses: ./.github/actions/yarn | ||
# Get Composer Dependencies | ||
- name: Get Composer Dependencies | ||
uses: pxgamer/composer-action@master | ||
with: | ||
command: install --no-dev --optimize-autoloader --prefer-dist | ||
|
||
# ZIP Release | ||
- uses: ./.github/actions/zip | ||
# Get yarn cache | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
# Create Release with Upload & Changelog | ||
- uses: ./.github/actions/release | ||
- uses: actions/cache@v1 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# Get & Compile Yarn packages | ||
- name: Get Yarn and compile assets | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- run: yarn install --ignore-optional | ||
- run: yarn build:production | ||
|
||
# Build Release Zip | ||
- name: ZIP Release | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
path: '.' | ||
filename: 'go-on-stage.zip' | ||
exclusions: '*.git* *.circleci* *.DS_Store* /*node_modules/* /resources/*assets/* .editorconfig .eslintrc.js .stylelintrc package.json yarn.lock webpack.mix.js tailwind.config.js' | ||
|
||
# Read Changelog.md for Release | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/[email protected] | ||
with: | ||
version: ${{ github.ref }} | ||
path: ./CHANGELOG.md | ||
|
||
# Create GitHub Release | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} on Stage | ||
body: ${{ steps.changelog_reader.outputs.log_entry }} # This pulls from the GET CHANGELOG ENTRY step above, referencing it's ID to get its outputs object, which include a `log_entry`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
draft: false | ||
prerelease: true | ||
|
||
# One ZIP upload directly to Release | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
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: ./go-on-stage.zip | ||
asset_name: stage.zip | ||
asset_content_type: application/zip |