Skip to content

Commit

Permalink
Merge pull request #5 from web-illinois/jonker/beta
Browse files Browse the repository at this point in the history
prepping for beta
  • Loading branch information
bryanjonker-illinois authored Sep 13, 2024
2 parents 6af9fd4 + 96b5b53 commit 668bc05
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 58 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: deploy_production
name: deploy
on:
push:
tags: [ '**' ]
release:
types: [published]
env:
MAJORVERSION: ''
MINORVERSION: ''
FULLVERSION: ''
PRERELEASE: ''
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
Expand All @@ -15,7 +16,7 @@ jobs:
uses: actions/checkout@v4
- name: 'Get Version'
id: get_version
uses: battila7/get-version-action@v2
uses: dhkatz/get-version-action@v3.0.0

- name: 'Check for correct naming convention'
if: ${{ !steps.get_version.outputs.is-semver }}
Expand All @@ -33,12 +34,22 @@ jobs:
run: echo "FULLVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV
env:
GITHUB_BRANCH: ${{ steps.get_version.outputs.version-without-v }}
- name: Get prelease version from tag
run: echo "PRERELEASE=${GITHUB_BRANCH}" >> $GITHUB_ENV
env:
GITHUB_BRANCH: ${{ steps.get_version.outputs.prerelease }}
- name: Display major version install
run: echo "Installing major version ${MAJORVERSION}"
run: echo "Installing major version ${MAJORVERSION} for ${COMPONENT_NAME}"
- name: Display minor version install
run: echo "Installing minor version ${MINORVERSION}"
run: echo "Installing minor version ${MINORVERSION} for ${COMPONENT_NAME}"
- name: Display patch (full) version install
run: echo "Installing patch (full) version ${FULLVERSION}"
run: echo "Installing patch (full) version ${FULLVERSION} for ${COMPONENT_NAME}"
- name: Production run
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: echo "Running production deployment"
- name: Prerelease run
if: ${{ steps.get_version.outputs.prerelease != '' }}
run: echo "Running development deployment"

- run: npm install
- run: npm rebuild
Expand All @@ -51,14 +62,32 @@ jobs:
aws-region: us-east-2

- name: Deploy toolbox to S3 bucket for major version
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MAJORVERSION --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache for major version
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MAJORVERSION*"
- name: Deploy toolbox to S3 bucket for minor version
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MINORVERSION --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache for minor version
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MINORVERSION*"
- name: Deploy toolbox to S3 bucket for patch (full) version
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache for patch (full) version
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$FULLVERSION*"
if: ${{ steps.get_version.outputs.prerelease == '' }}
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$FULLVERSION*"
- name: Deploy toolbox to S3 bucket for full version dev
if: ${{ steps.get_version.outputs.prerelease != '' }}
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache for full version dev
if: ${{ steps.get_version.outputs.prerelease != '' }}
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$FULLVERSION*"
- name: Deploy toolbox to S3 bucket for latest dev
if: ${{ steps.get_version.outputs.prerelease != '' }}
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/latest --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache for latest dev
if: ${{ steps.get_version.outputs.prerelease != '' }}
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/latest*"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy_development
name: deploy_development_manual
on:
workflow_dispatch:
inputs:
Expand All @@ -8,7 +8,6 @@ on:
default: ''
type: string
env:
MAJORVERSION: ''
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
Expand All @@ -21,7 +20,7 @@ jobs:
env:
GITHUB_BRANCH: ${{ github.event.inputs.version }}
- name: Display version install
run: echo "Installing dev version ${VERSION}"
run: echo "Installing dev version ${VERSION} for component ${COMPONENT_NAME}"

- run: npm install
- run: npm rebuild
Expand All @@ -35,4 +34,4 @@ jobs:
- name: Deploy toolbox to S3 bucket
run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/$VERSION --delete --acl bucket-owner-full-control
- name: Invalidate Cloudfront cache
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$VERSION*"
run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$VERSION*"
5 changes: 1 addition & 4 deletions .github/workflows/deploy_production_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
default: ''
type: string
env:
MAJORVERSION: ''
MINORVERSION: ''
FULLVERSION: ''
COMPONENT_NAME: ${{ github.event.repository.name }}
jobs:
build:
Expand All @@ -23,7 +20,7 @@ jobs:
env:
GITHUB_BRANCH: ${{ github.event.inputs.version }}
- name: Display version install
run: echo "Installing production version ${VERSION}"
run: echo "Installing production version ${VERSION} for component ${COMPONENT_NAME}"

- run: npm install
- run: npm rebuild
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish_npm.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: publish_npm
on:
workflow_dispatch:
push:
tags: [ '**' ]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,4 +18,4 @@ jobs:
- name: Install to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.TOOLKIT_NPM_SECRET}}
NODE_AUTH_TOKEN: ${{secrets.TOOLKIT_NPM_SECRET}}
31 changes: 0 additions & 31 deletions .github/workflows/templating.yml

This file was deleted.

2 changes: 1 addition & 1 deletion builder/ilw-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"description": "Creates a grid of items that you can use to display information.",
"toolkit-version": "",
"production-version": "",
"development-version": "1.0.0-alpha1"
"development-version": "1.0-beta"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"type": "web component",
"element-name": "ilw-grid",
"description": "Creates a grid of items that you can use to display information.",
"version": "1.0.0-alpha1",
"date": "07/17/2024",
"css": "https://dev.toolkit.illinois.edu/ilw-grid/1.0.0-alpha1/ilw-grid.css",
"js": "https://dev.toolkit.illinois.edu/ilw-grid/1.0.0-alpha1/ilw-grid.js",
"builder-version": "1.0-beta",
"version": "1.0.0-beta",
"date": "09/13/2024",
"css": "https://dev.toolkit.illinois.edu/ilw-grid/1.0.0-beta/ilw-grid.css",
"js": "https://dev.toolkit.illinois.edu/ilw-grid/1.0.0-beta/ilw-grid.js",
"production": false,
"notes": "",
"parent-style": "",
Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"description": "Illinois Toolkit: Creates a grid of items that you can use to display information.",
"repository": "github:web-illinois/ilw-grid",
"private": false,
"version": "1.0.0-alpha1",
"license": "MIT",
"version": "1.0.0-beta",
"type": "module",
"files": [
"src/**",
Expand Down

0 comments on commit 668bc05

Please sign in to comment.