Skip to content

Commit

Permalink
Merge pull request #231 from cmu-delphi/release/5.0.0
Browse files Browse the repository at this point in the history
Release 5.0.0
  • Loading branch information
nmdefries authored Apr 6, 2022
2 parents ddfcbc4 + ea9fc00 commit 6541006
Show file tree
Hide file tree
Showing 46 changed files with 2,380 additions and 1,729 deletions.
8 changes: 8 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bumpversion]
current_version = 5.0.0
commit = False
tag = False

[bumpversion:file:DESCRIPTION]

[bumpversion:file:app/global.R]
127 changes: 127 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# These settings are for any web project

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto eol=lf

#
# The above will handle all files NOT found below
#

#
## These files are text and should be normalized (Convert crlf => lf)
#

# source code
*.php text
*.css text
*.sass text
*.scss text
*.less text
*.styl text
*.js text
*.ts text
*.coffee text
*.json text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
*.sh text eof=LF
*.bat text

# templates
*.hbt text
*.jade text
*.haml text
*.hbs text
*.dot text
*.tmpl text
*.phtml text

# server config
.htaccess text

# git config
.gitattributes text
.gitignore text

# code analysis config
.jshintrc text
.jscsrc text
.jshintignore text
.csslintrc text

# misc config
*.yaml text
*.yml text
.editorconfig text

# build config
*.npmignore text
*.bowerrc text
Dockerfile text eof=LF

# Heroku
Procfile text
.slugignore text

# Documentation
*.md text
LICENSE text
AUTHORS text


#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.pyc binary
*.pdf binary

# Source files
# ============
*.pxd text
*.py text
*.py3 text
*.pyw text
*.pyx text
*.sh text eol=lf
*.json text

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pyc binary
*.pyd binary
*.pyo binary

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
28 changes: 28 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "📚 Content Changes"
labels:
- "blog"
- "content"
- title: "🚀 Features"
labels:
- "enhancement"
- "feature"
- title: "🐛 Bugs Fixes"
labels:
- "bug"
- title: "📕 Documentation"
labels:
- "documentation"
- title: "🧰 Development"
labels:
- "chore"
- "documentation"
- "dependencies"
change-template: "- #$NUMBER $TITLE"
change-title-escapes: '\<*_&`#@'
template: |
$CHANGES
Thanks to $CONTRIBUTORS
80 changes: 80 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: ci

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v1
- name: Style / Format
shell: Rscript {0}
run: styler::style_dir(dry="fail")
- name: Lint
shell: Rscript {0}
run: |
lintr::lint_dir('.')
image:
needs: build
# only on main and dev branch
if: startsWith(github.ref, 'refs/heads/main') || github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Pull Image Data
run: make pull_data
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: cmu-delphi-deploy-machine
password: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }}
- name: Build Image
env:
DEVOPS_DOCKER_FILE: ./devops/Dockerfile
run: |
docker build -t repo --file ${DEVOPS_DOCKER_FILE} .
- name: Resolve Tag
id: tagname
run: |
baseRef="${GITHUB_REF#*/}"
imageTag="${baseRef#*/}"
if [ "$imageTag" = "main" ] ; then
imageTag="latest"
fi
echo "::set-output name=tag::$imageTag"
echo "::set-output name=repo::ghcr.io/${{ github.repository }}"
- name: Push Dev Tag
run: |
docker tag repo ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }}
docker push ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }}
- name: Set up Python 3.8
if: startsWith(github.ref, 'refs/heads/main')
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Extract version
if: startsWith(github.ref, 'refs/heads/main')
id: extract_version
run: |
python -m pip install bump2version
echo -n "::set-output name=version::"
bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,
- name: Trigger Webhook
run: |
# trigger a webhook update
curl -H "Authorization: Bearer ${{ secrets.DELPHI_DEPLOY_WEBHOOK_TOKEN }}" \
-X POST ${{ secrets.DELPHI_DEPLOY_WEBHOOK_URL }} \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "repository=${{ steps.tagname.outputs.repo }}&tag=${{ steps.tagname.outputs.tag }}"
- name: Push Version Tag Tag
if: startsWith(github.ref, 'refs/heads/main')
run: |
docker tag repo ${{ steps.tagname.outputs.repo }}:v${{ steps.extract_version.outputs.version }}
docker push ${{ steps.tagname.outputs.repo }}:v${{ steps.extract_version.outputs.version }}
43 changes: 43 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create Release
on:
workflow_dispatch:
inputs:
versionName:
description: "Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)"
required: true
default: patch
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: main
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
- name: Reset main branch
run: |
git fetch origin dev:dev
git reset --hard dev
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Change version number
id: version
run: |
python -m pip install bump2version
echo -n "::set-output name=next_tag::"
bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",,
- name: Create pull request into main
uses: peter-evans/create-pull-request@v3
with:
branch: release/${{ steps.version.outputs.next_tag }}
commit-message: "chore: release ${{ steps.version.outputs.next_tag }}"
base: main
title: Release ${{ steps.version.outputs.next_tag }}
labels: chore
reviewers: krivard
assignees: krivard
body: |
Releasing ${{ steps.version.outputs.next_tag }}.
54 changes: 0 additions & 54 deletions .github/workflows/main.yml

This file was deleted.

Loading

0 comments on commit 6541006

Please sign in to comment.