From 2937eaab3dcf27711c694c3c646833db639d0f6d Mon Sep 17 00:00:00 2001 From: Alexander Koz Date: Fri, 9 Feb 2024 21:42:03 +0400 Subject: [PATCH] CI: update deps, add bump sys version to update workflow --- .github/workflows/post.yml | 25 ++++++++++++++------ .github/workflows/update.yml | 45 +++++++++++++++++++++++++++++++++--- 2 files changed, 60 insertions(+), 10 deletions(-) diff --git a/.github/workflows/post.yml b/.github/workflows/post.yml index 8c5972bd..dd294cf0 100644 --- a/.github/workflows/post.yml +++ b/.github/workflows/post.yml @@ -2,6 +2,19 @@ name: Post on: release: types: [published] + workflow_dispatch: + inputs: + crate: + type: string + description: "Name of published crate" + required: false + version: + type: string + description: "Version of published crate." + required: false + message: + description: "Just message to post." + required: false jobs: post: name: Post @@ -15,12 +28,10 @@ jobs: - name: Toot id: mastodon - uses: cbrgm/mastodon-github-action@v1 + uses: cbrgm/mastodon-github-action@v2.0.1 with: message: | - 🦀 Rusty Playdate Updated - - New release happens! + 🦀 Rusty Playdate Updated! ${{ steps.url.outputs.value }} @@ -28,7 +39,7 @@ jobs: # TODO: Write good-look link like [github.event.repository.name](url) + language: "en" visibility: "public" # use `unlisted` for tests - env: - MASTODON_URL: ${{ secrets.MASTODON_URL }} - MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} + url: ${{ secrets.MASTODON_URL }} + access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 590c240f..309b74d6 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -277,10 +277,49 @@ jobs: echo "Pushed: ${{ steps.commit.outputs.pushed }}" echo "SHA: ${{ steps.commit.outputs.commit_sha }}" - pr: + bump: name: Make PR needs: [new-branch, pre-gen, pre-gen-arm] runs-on: ubuntu-latest + defaults: + run: + shell: bash + permissions: + pull-requests: write + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ needs.new-branch.outputs.working }} + + - name: Bump Version + uses: tj-actions/cargo-bump@v2.1.0 + with: + release_type: patch + working-directory: ./api/sys + + - name: Commit + id: commit + uses: EndBug/add-and-commit@v9.1.4 + with: + add: ./api/sys/Cargo.toml + author_name: Alex Koz + author_email: boozook@users.noreply.github.com + committer_name: Bump sys version + message: Automated bump sys crate version + pull: "--rebase --autostash" + push: true + + - name: Committed + run: | + echo "Committed: ${{ steps.commit.outputs.committed }}" + echo "Pushed: ${{ steps.commit.outputs.pushed }}" + echo "SHA: ${{ steps.commit.outputs.commit_sha }}" + + pr: + name: Make PR + needs: [new-branch, pre-gen, pre-gen-arm, bump] + runs-on: ubuntu-latest defaults: run: shell: bash @@ -305,8 +344,8 @@ jobs: TO_BRANCH: ${{ needs.new-branch.outputs.base || github.event.repository.default_branch }} PULL_REQUEST_TITLE: Update pre-built bindings PULL_REQUEST_BODY: | - Pre-built bindings just updated. - Don't forget to bump version and make release. + - [x] Pre-built bindings just updated. + - [ ] Bump sys crate PULL_REQUEST_IS_DRAFT: false CONTENT_COMPARISON: true REVIEWERS: '["boozook"]'