Skip to content

create_publish_release #88

create_publish_release

create_publish_release #88

Workflow file for this run

name: create_publish_release
on:
release:
types: [released]
workflow_dispatch: {}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Checkout with submodules
uses: actions/checkout@v4
with:
submodules: recursive
ref: 'main'
fetch-depth: 0
- name: Setup buf
uses: bufbuild/buf-setup-action@v1
- name: Lint protofiles with buf
uses: bufbuild/buf-lint-action@v1
- name: Git Submodule Update
run: |
git pull origin main --recurse-submodules
git submodule update --init --remote --recursive
- name: Grab version tags
run: |
echo VERSION=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\///;') >> $GITHUB_ENV
echo NEW_VERSION=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\///;s/+.*$//') >> $GITHUB_ENV
echo NEW_VERSION_NO_V=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\/v//;s/+.*$//') >> $GITHUB_ENV
- name: Set version
run: |
sed -i -e "s/version: .*/version: \"$NEW_VERSION_NO_V\"/" ./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 $NEW_VERSION" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tags: true
force: true
- name: Up GH release
run: gh release edit $VERSION --tag $NEW_VERSION --draft=false --prerelease=false
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
- name: Repository Dispatch (rust)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/rust-api
event-type: publish
- name: Repository Dispatch (python)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/python-api
event-type: publish
- name: Repository Dispatch (java)
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.ARUNA_ACCESS_TOKEN }}
repository: ArunaStorage/java-api
event-type: publish