Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
feat: migrates to GitHub Actions (#32)
Browse files Browse the repository at this point in the history
* feat: migrates to GitHub Actions

* fix: updates dependencies
  • Loading branch information
cujarrett authored Oct 5, 2021
1 parent b7688a8 commit 6d1e430
Show file tree
Hide file tree
Showing 6 changed files with 2,910 additions and 3,160 deletions.
123 changes: 0 additions & 123 deletions .circleci/config.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: release

on:
push:
branches:
- main

jobs:
release:
name: release
environment: main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v2
- run: npm ci
- run: npm run lint
- run: npm run test
- env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
deploy:
name: deploy
needs: release
environment: main
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v2
- run: npm install --production
- run: npm run build
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws lambda update-function-code \
--function-name=glimpse-backend \
--zip-file=fileb://build/glimpse-backend.zip 1> /dev/null \
--region=us-east-1
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: test

on:
push:
branches-ignore:
- main
pull_request:
types: [opened, reopened]

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: npm ci
- run: npm run lint
- run: npm run test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://circleci.com/gh/cujarrett/glimpse-backend/tree/main"><img alt="Circle CI" src="https://circleci.com/gh/cujarrett/glimpse-backend/tree/main.svg?style=svg"></a>
<a href="https://github.com/cujarrett/glimpse-backend/actions"><img alt="CI/CD" src="https://github.com/cujarrett/glimpse-backend/actions/workflows/release.yml/badge.svg"></a>
<a href="https://discord.gg/jAA5U52"><img alt="Chat on Discord" src="https://img.shields.io/discord/460598989939802115?label=Discord"></a>
<a href="https://github.com/semantic-release/semantic-release"><img alt="Project uses semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg"></a>
<a href="http://commitizen.github.io/cz-cli/"><img alt="Commitizen friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?"></a>
Expand Down
Loading

0 comments on commit 6d1e430

Please sign in to comment.