Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions .github/workflows/staging.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ jobs:
~/.cargo/git/db/

bump-version:
needs: restore-tools
needs:
- restore-tools
if: github.ref_name == github.event.repository.default_branch
runs-on: ubuntu-latest
outputs:
SEMVER: ${{ steps.semver-tag.outputs.SEMVER }}
steps:
- name: Restore Tools
uses: actions/cache/restore@v4
Expand All @@ -56,15 +59,22 @@ jobs:
with:
fetch-depth: 0
fetch-tags: true
# token: ${{ secrets.SYSU_BOT_TOKEN }}
token: ${{ secrets.THESIS_CI_TOKEN }}
persist-credentials: true

- name: Configure triger user for git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

- name: Set bumped version enviornment
id: semver-tag
run: |
BUMPED_VERSION=$(git cliff --bumped-version --unreleased)
echo "BUMPED_VERSION=$BUMPED_VERSION" >> $GITHUB_ENV
SEMVER=$(echo $BUMPED_VERSION | sd 'v(.*)' '$1')
echo "SEMVER=$SEMVER" >> $GITHUB_ENV
echo "SEMVER=$SEMVER" >> $GITHUB_OUTPUT

- name: Generate release note for tagging
run: |
Expand Down Expand Up @@ -94,3 +104,41 @@ jobs:

- name: push to upstream
run: git push origin

publish2universe:
runs-on: ubuntu-latest
needs:
- bump-version
steps:
- name: Restore Tools
uses: actions/cache/restore@v4
with:
key: cargo
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/

- name: Restore semver-tag
run: |
SEMVER = ${{ needs.bump-version.outputs.SEMVER }}
echo "SEMVER=$SEMVER" >> $GITHUB_ENV

- name: Checkout Repository with tagged commit
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Checkout Packages fork
uses: actions/checkout@v4
with:
repository: sysu/packages
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.TYPST_PACKAGES_FORK_TOKEN }}
persist-credentials: true

- name: ls for check
run: ls