mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Bumps [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) from 5a3edc67490343006aa8cc8e4a7c69ef6094d733 to 81f328ec1608a441b4898147a8da7b97a3430d69.
- [Release notes](https://github.com/peter-evans/repository-dispatch/releases)
- [Commits](5a3edc6749...81f328ec16)
---
updated-dependencies:
- dependency-name: peter-evans/repository-dispatch
dependency-version: 81f328ec1608a441b4898147a8da7b97a3430d69
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
89 lines
4.3 KiB
YAML
89 lines
4.3 KiB
YAML
name: publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
##############################################################################
|
|
# JOB: GITHUB TAG LATEST VERSION #############################################
|
|
##############################################################################
|
|
github_tag:
|
|
name: Tag latest version on Github
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
|
|
with:
|
|
fetch-depth: 0 # Fetch full History for changelog
|
|
- name: Setup env
|
|
run: |
|
|
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
|
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
|
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
|
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
|
- name: package-version-to-git-tag + build number
|
|
uses: pkgdeps/git-tag-action@v3.0.0 # v3.0.0
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
github_repo: ${{ github.repository }}
|
|
version: ${{ env.BUILD_VERSION }}
|
|
git_commit_sha: ${{ github.sha }}
|
|
git_tag_prefix: "b"
|
|
- name: Generate changelog
|
|
run: |
|
|
yarn install
|
|
yarn auto-changelog --latest-version ${{ env.VERSION }} --unreleased-only
|
|
- name: package-version-to-git-release
|
|
continue-on-error: true # Will fail if tag exists
|
|
id: create_release
|
|
uses: actions/create-release@4c11c9fe1dcd9636620a16455165783b20fc7ea0 # v1.1.4
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
with:
|
|
tag_name: ${{ env.VERSION }}
|
|
release_name: ${{ env.VERSION }}
|
|
body_path: ./CHANGELOG.md
|
|
draft: false
|
|
prerelease: false
|
|
|
|
build_trigger:
|
|
name: Trigger successful build
|
|
runs-on: ubuntu-latest
|
|
needs: [github_tag]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7
|
|
with:
|
|
fetch-depth: 0 # Fetch full History for changelog
|
|
- name: Setup env
|
|
run: |
|
|
echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
|
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
|
echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
|
- run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
|
#- name: Repository Dispatch
|
|
# uses: peter-evans/repository-dispatch@81f328ec1608a441b4898147a8da7b97a3430d69 # v3.0.0
|
|
# with:
|
|
# token: ${{ github.token }}
|
|
# event-type: trigger-ocelot-build-success
|
|
# repository: ${{ github.repository }}
|
|
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
|
|
|
- name: Repository Dispatch stage.ocelot.social
|
|
uses: peter-evans/repository-dispatch@81f328ec1608a441b4898147a8da7b97a3430d69 # v3.0.0
|
|
with:
|
|
token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
|
|
event-type: trigger-ocelot-build-success
|
|
repository: 'Ocelot-Social-Community/stage.ocelot.social'
|
|
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|
|
|
|
- name: Repository Dispatch stage.yunite.me
|
|
uses: peter-evans/repository-dispatch@81f328ec1608a441b4898147a8da7b97a3430d69 # v3.0.0
|
|
with:
|
|
token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
|
|
event-type: trigger-ocelot-build-success
|
|
repository: 'Yunite-Net/stage.yunite.me'
|
|
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "GITHUB_RUN_NUMBER": "${{ env.GITHUB_RUN_NUMBER }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
|