-
Notifications
You must be signed in to change notification settings - Fork 0
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 #7 from DeschutesDesignGroupLLC/add-versioning-fea…
…ture Add versioning to widget
- Loading branch information
Showing
3 changed files
with
30 additions
and
15 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 |
---|---|---|
|
@@ -26,17 +26,30 @@ jobs: | |
- name: Run Linter | ||
run: npm run lint | ||
|
||
- name: Bump Application Version and Tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: patch | ||
default_prerelease_bump: prerelease | ||
release_branches: master | ||
pre_release_branches: prerelease | ||
append_to_pre_release_tag: prerelease | ||
|
||
- name: Build Application for Staging | ||
if: github.ref == 'refs/heads/prerelease' | ||
run: npm run build:widget | ||
env: | ||
REACT_APP_API_URL: https://api.staging.perscom.io/v1/widget/roster | ||
REACT_APP_WIDGET_VERSION: ${{ steps.tag_version.outputs.new_tag }} | ||
|
||
- name: Build Application for Production | ||
if: github.ref == 'refs/heads/master' | ||
run: npm run build:widget | ||
env: | ||
REACT_APP_API_URL: https://api.perscom.io/v1/widget/roster | ||
REACT_APP_WIDGET_VERSION: ${{ steps.tag_version.outputs.new_tag }} | ||
|
||
- name: Setup AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
|
@@ -45,17 +58,6 @@ jobs: | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Bump Application Version and Tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: patch | ||
default_prerelease_bump: prerelease | ||
release_branches: master | ||
pre_release_branches: prerelease | ||
append_to_pre_release_tag: prerelease | ||
|
||
- name: Deploy to S3 Staging | ||
if: github.ref == 'refs/heads/prerelease' | ||
run: aws s3 sync ./dist/ s3://${{ secrets.AWS_BUCKET_NAME_STAGING }} --delete | ||
|
@@ -73,7 +75,16 @@ jobs: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
|
||
- name: Create Release | ||
- name: Create Staging Release | ||
uses: ncipollo/release-action@v1 | ||
if: github.ref == 'refs/heads/prerelease' | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
prerelease: true | ||
|
||
- name: Create Production Release | ||
uses: ncipollo/release-action@v1 | ||
if: github.ref == 'refs/heads/master' | ||
with: | ||
|
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,7 +1,10 @@ | ||
const url = { | ||
const constants = { | ||
version: { | ||
WIDGET_VERSION: process.env.REACT_APP_WIDGET_VERSION | ||
}, | ||
roster: { | ||
API_URL: process.env.REACT_APP_API_URL | ||
} | ||
} | ||
|
||
export const config = url | ||
export const config = constants |
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