sonr/.github/workflows/publish.yml
Prad Nukala d26d3d7b4d
feature/1220 origin handle exists method (#1242)
* feat: add docs and CI workflow for publishing to onsonr.dev

* (refactor): Move hway,motr executables to their own repos

* feat: simplify devnet and testnet configurations

* refactor: update import path for didcrypto package

* docs(networks): Add README with project overview, architecture, and community links

* refactor: Move network configurations to deploy directory

* build: update golang version to 1.23

* refactor: move logger interface to appropriate package

* refactor: Move devnet configuration to networks/devnet

* chore: improve release process with date variable

* (chore): Move Crypto Library

* refactor: improve code structure and readability in DID module

* feat: integrate Trunk CI checks

* ci: optimize CI workflow by removing redundant build jobs

* feat: integrate Trunk CI checks, simplify devnet and testnet configurations, add docs and CI for onsonr.dev publishing, automate releases using Taskfile and GitHub Actions, and add Reddit release notification

* ci: Trigger release validation on pull requests

* ci: Migrate GoReleaser configuration to Makefiles

* chore: update CI workflow permissions and rename job

---------

Co-authored-by: Darp Alakun <i@prad.nu>
2025-01-06 17:24:48 +00:00

67 lines
1.8 KiB
YAML

name: Publish Assets on Release
on:
release:
types: [published]
permissions:
contents: write
issues: write
jobs:
buf_push:
name: Publish to buf.build/onsonr/sonr
runs-on: ubuntu-latest
steps:
# Run `git checkout`
- uses: actions/checkout@v4
# Install the `buf` CLI
- uses: bufbuild/buf-setup-action@v1
# Push only the Input in `proto` to the BSR
- uses: bufbuild/buf-push-action@v1
continue-on-error: true
with:
input: proto
buf_token: ${{ secrets.BUF_TOKEN }}
container-push:
name: Publish Container Images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/onsonr/sonr:latest
docs-push:
runs-on: ubuntu-latest
name: Publish Docs to onsonr.dev
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force