Applied cargo fmt to everything #10
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
# Continuous integration and delivery of the main branch. | |
name: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# Release on Github, Docker, and PyPI | |
release: | |
# Automatic delivery will run on a Github-hosted machine | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Write commit message | |
run: git log --format=%B -n 1 ${{ github.event.after }} > release_notes.txt | |
- name: Github Bumpversion Action | |
id: version-bump | |
uses: jasonamyers/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEFAULT_BUMP: "patch" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tags: true | |
- name: Create Github release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.version-bump.outputs.new_ver }} | |
release_name: 'v${{ steps.version-bump.outputs.new_ver }}' | |
body_path: "release_notes.txt" | |
draft: false | |
prerelease: false | |
- name: Authenticate to Google Cloud | |
id: 'auth' | |
uses: 'google-github-actions/auth@v0' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}' | |
- name: Create Docker image | |
run: |- | |
TAG=${{ steps.version-bump.outputs.new_ver }} | |
cd docker | |
docker build --build-arg branch=v$TAG -t us.gcr.io/broad-dsp-lrma/lr-hidive:$TAG . | |
gcloud auth configure-docker -q | |
docker push -q us.gcr.io/broad-dsp-lrma/lr-hidive:$TAG |