Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
add github actions to create a release and deploy to dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mfugate1 committed Oct 21, 2020
1 parent 9ce5a1b commit 0e08520
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 21 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Build and Deploy'
on:
push:
branches:
- 'master'
paths-ignore:
- projects/server/**
- terraform/**
jobs:
bump-version:
name: 'Build and Deploy'
runs-on: ubuntu-latest
steps:
- uses: 'actions/checkout@v2'
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: phips28/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm ci
- run: npm run build:prod
- run: zip -r upgrade-client-v${{ steps.package-version.outputs.current-version}}.zip *
working-directory: dist/abtesting
- run: mv dist/abtesting/upgrade-client-v${{ steps.package-version.outputs.current-version}}.zip .
- name: Generate Release Changelog
uses: Bullrich/[email protected]
id: changelog
env:
REPO: ${{ github.repository }}
- name: Generate Slack Changelog
run: |
echo 'CHANGELOG<<EOF' >> $GITHUB_ENV
git log --color=never --pretty='tformat:%xe2%x80%xa2 `%h` %s (%an)' ${{github.event.before}}..HEAD >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- uses: martinbeentjes/[email protected]
id: package-version
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: upgrade-client-v${{ steps.package-version.outputs.current-version}}.zip
tag: v${{ steps.package-version.outputs.current-version}}
name: Upgrade Client ${{ steps.package-version.outputs.current-version}}
body: ${{ steps.changelog.outputs.changelog }}
commit: master
token: ${{ secrets.GITHUB_TOKEN }}
- uses: koraykoska/[email protected]
env:
S3_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
FILE: dist/abtesting/
20 changes: 0 additions & 20 deletions .github/workflows/version.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion package-lock.json

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

0 comments on commit 0e08520

Please sign in to comment.