Skip to content

create_publish_release #71

create_publish_release

create_publish_release #71

Workflow file for this run

name: create_publish_release
on:
workflow_dispatch:
inputs:
tag:
description: 'Semver release version'
required: true
type: string
message:
description: 'Message for the new tag'
required: false
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Checkout without submodules
uses: actions/checkout@v3
- name: Setup buf
uses: bufbuild/buf-setup-action@v1
- name: Lint protofiles with buf
uses: bufbuild/buf-lint-action@v1
- name: Checkout with submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Git Submodule Update
run: |
git pull --recurse-submodules
git submodule update --init --recursive
git submodule update --remote --recursive
- name: Update tag in swaggerdoc
run: |
sed -i -e 's/version: .*/version: "${{ inputs.tag }}"/' ./aruna/api/storage/services/v2/project_service.proto
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff-index --quiet HEAD || git commit -m "Update version to ${{ inputs.tag }}" -a
git tag -a v${{ inputs.tag }} -m "Published new version: ${{ inputs.tag }}. Changes: ${{ inputs.message }}."
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
force: true
- name: Try delete (old) release
run: gh release delete v${{ inputs.tag }}
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
run: gh release create v${{ inputs.tag }} --title "v${{ inputs.tag }}" --notes "${{ inputs.message }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Repository Dispatch (go)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/go-api
event-type: publish
client-payload: '{"version": "${{ inputs.tag }}", "message": "${{ inputs.message }}"}'
- name: Repository Dispatch (rust)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/rust-api
event-type: publish
client-payload: '{"version": "${{ inputs.tag }}", "message": "${{ inputs.message }}"}'
- name: Repository Dispatch (python)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/python-api
event-type: publish
client-payload: '{"version": "${{ inputs.tag }}", "message": "${{ inputs.message }}"}'
- name: Repository Dispatch (java)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/java-api
event-type: publish
client-payload: '{"version": "${{ inputs.tag }}", "message": "${{ inputs.message }}"}'