tusd/.github/workflows/release.yaml

114 lines
2.6 KiB
YAML
Raw Permalink Normal View History

name: release
on:
push:
branches:
2023-01-18 12:04:11 +00:00
- main
tags:
- "v*"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
- run: |
echo "GIT_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
-
name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4.4.0
with:
images: |
ghcr.io/tus/tusd
tusproject/tusd
tags: |
type=sha
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2.5.0
with:
install: true
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
-
name: Login to Docker Container Registry
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push
id: build
uses: docker/build-push-action@v4
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha
build-args: |
GIT_VERSION=${{ env.GIT_VERSION }}
GIT_COMMIT=${{ github.sha }}
platforms: linux/amd64,linux/arm64/v8
build-binary:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
env:
GO111MODULE: on
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Install Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
-
name: Build TUSD
run: ./scripts/build_all.sh
-
name: GitHub Release
uses: softprops/action-gh-release@v0.1.15
with:
files: tusd_*.*
deploy-heroku:
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Deploy to heroku
deps: Upgrade dependencies (#957) * build(deps): bump golang from 1.20.3-alpine to 1.20.4-alpine Bumps golang from 1.20.3-alpine to 1.20.4-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump alpine from 3.17.3 to 3.18.0 Bumps alpine from 3.17.3 to 3.18.0. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump akhileshns/heroku-deploy from 3.12.13 to 3.12.14 Bumps [akhileshns/heroku-deploy](https://github.com/akhileshns/heroku-deploy) from 3.12.13 to 3.12.14. - [Release notes](https://github.com/akhileshns/heroku-deploy/releases) - [Commits](https://github.com/akhileshns/heroku-deploy/compare/v3.12.13...v3.12.14) --- updated-dependencies: - dependency-name: akhileshns/heroku-deploy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.4 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/prometheus/client_golang Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.0 to 1.15.1. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.15.0...v1.15.1) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump github.com/aws/aws-sdk-go from 1.44.253 to 1.44.273 Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.253 to 1.44.273. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.253...v1.44.273) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump google.golang.org/grpc from 1.54.0 to 1.55.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.54.0 to 1.55.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.54.0...v1.55.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-05 09:05:37 +00:00
uses: akhileshns/heroku-deploy@v3.12.14
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME}}
heroku_email: ${{secrets.HEROKU_USER_EMAIL}}
2022-07-20 01:51:42 +00:00
stack: heroku-22