mirror of
https://github.com/dokku/dokku.git
synced 2025-12-28 16:06:40 +01:00
88 lines
2.7 KiB
YAML
88 lines
2.7 KiB
YAML
---
|
|
name: 'release'
|
|
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_type:
|
|
description: 'Release type [build, betafish, patch, minor, major]'
|
|
required: true
|
|
default: 'build'
|
|
|
|
jobs:
|
|
release:
|
|
name: release
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.6
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: install package_cloud
|
|
run: gem install package_cloud
|
|
|
|
- name: configure git
|
|
run: |
|
|
git config --global user.name 'Dokku Bot'
|
|
git config --global user.email no-reply@dokku.com
|
|
|
|
- name: build package
|
|
run: contrib/release-dokku ${{ github.event.inputs.release_type }}
|
|
|
|
- name: output version
|
|
id: version
|
|
run: echo "::set-output name=version::$(cat build/next-version)"
|
|
|
|
- name: upload packages
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: build
|
|
path: build
|
|
|
|
bump-azure:
|
|
name: bump-azure
|
|
runs-on: ubuntu-20.04
|
|
needs: release
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Bump Azure Template
|
|
env:
|
|
BOT_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
|
BOT_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
|
run: |
|
|
VERSION=${{ needs.release.outputs.version }}
|
|
git config --global user.name 'Dokku Bot'
|
|
git config --global user.email no-reply@dokku.com
|
|
.github/commands/bump-azure "${VERSION:1}" "$BOT_GITHUB_USERNAME" "$BOT_GITHUB_API_TOKEN"
|
|
|
|
bump-formula:
|
|
name: bump-formula
|
|
runs-on: macos-latest
|
|
needs: release
|
|
steps:
|
|
- name: Bump Homebrew Formula
|
|
env:
|
|
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
|
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
|
run: |
|
|
git config --global user.name 'Dokku Bot'
|
|
git config --global user.email no-reply@dokku.com
|
|
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
|
brew bump-formula-pr -f --no-browse --no-audit --no-fork --debug --verbose --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|