mirror of
https://github.com/FlipsideCrypto/convox.git
synced 2026-02-06 19:07:13 +00:00
109 lines
3.2 KiB
YAML
109 lines
3.2 KiB
YAML
name: release
|
|
on:
|
|
push:
|
|
branches-ignore: ["*"]
|
|
tags: ["*"]
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v1
|
|
- name: version
|
|
run: echo "::set-env name=VERSION::$(echo ${{ github.ref }} | awk -F/ '{print $3}')"
|
|
- name: changelog
|
|
id: changelog
|
|
run: |
|
|
changelog=$(git log --pretty="* %s" ...$(git describe --abbrev=0 HEAD~))
|
|
echo ${changelog}
|
|
changelog="${changelog//'%'/'%25'}"
|
|
changelog="${changelog//$'\n'/'%0A'}"
|
|
changelog="${changelog//$'\r'/'%0D'}"
|
|
echo "::set-output name=text::${changelog}"
|
|
- name: release
|
|
id: release
|
|
uses: ddollar/create-release@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
body: ${{ steps.changelog.outputs.text }}
|
|
prerelease: true
|
|
release_name: "${{ env.VERSION }}"
|
|
tag_name: ${{ env.VERSION }}
|
|
- name: tools
|
|
run: make tools
|
|
- name: docs
|
|
run: make docs VERSION=${VERSION}
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_UPLOAD_ACCESS }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_UPLOAD_SECRET }}
|
|
- name: cli
|
|
run: make -C cmd/convox build
|
|
- name: build
|
|
run: docker build -t convox/convox:${VERSION} .
|
|
- name: login
|
|
run: docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: push
|
|
run: docker push convox/convox:${VERSION}
|
|
- name: release-cli-linux
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.release.outputs.upload_url }}
|
|
asset_path: ./cmd/convox/pkg/convox-linux-amd64
|
|
asset_name: convox-linux
|
|
asset_content_type: application/octet-stream
|
|
- name: release-cli-macos
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.release.outputs.upload_url }}
|
|
asset_path: ./cmd/convox/pkg/convox-darwin-10.6-amd64
|
|
asset_name: convox-macos
|
|
asset_content_type: application/octet-stream
|
|
ci:
|
|
needs: release
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
provider:
|
|
- aws
|
|
- azure
|
|
- do
|
|
- gcp
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v1
|
|
- name: version
|
|
run: echo "::set-env name=VERSION::$(echo ${{ github.ref }} | awk -F/ '{print $3}')"
|
|
- name: name
|
|
run: echo "::set-env name=RACK_NAME::ci-$(date +"%Y%m%d%H%M%S")"
|
|
- name: provider
|
|
run: echo "::set-env name=PROVIDER::${{ matrix.provider }}"
|
|
- name: secrets
|
|
run: ci/secrets.sh
|
|
env:
|
|
SECRETS: ${{ toJson(secrets) }}
|
|
- name: dependencies
|
|
run: ci/dependencies.sh
|
|
- name: cli
|
|
run: ci/cli.sh
|
|
- name: install
|
|
run: ci/install.sh
|
|
- name: wait
|
|
run: sleep 300
|
|
- name: test
|
|
run: ci/test.sh
|
|
- name: debug
|
|
run: ci/debug.sh
|
|
if: always()
|
|
- name: uninstall
|
|
run: ci/uninstall.sh
|
|
if: always()
|