Skip to content

Commit

Permalink
Test pushing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tirumerla committed Dec 8, 2023
1 parent ec85d28 commit cee5c8a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/rc-publish-test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Publish rc test

on:
push:
branches:
- fix-bugs
workflow_run:
workflows: ["push rc test"]
types:
- completed

# Declare default permissions as read only.
permissions: read-all

jobs:
check_author:
runs-on: ubuntu-22.04
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
outputs:
latest_commit_author: ${{ steps.commit.outputs.author }}
commit_message: ${{ steps.commit.outputs.message }}
Expand Down Expand Up @@ -68,7 +70,7 @@ jobs:
node-version: "16.20.0"

tag:
name: Publish & Tag RC candidate for all packages
name: Tag RC candidate for all packages
permissions:
id-token: write
contents: write
Expand Down Expand Up @@ -146,6 +148,8 @@ jobs:
run: |
git tag -a ${{ steps.get_version.outputs.rc_version }} -m "${{ steps.get_version.outputs.rc_version }}"
git push origin ${{ steps.get_version.outputs.rc_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

create-release:
permissions:
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/rc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,21 @@ jobs:
echo "rc_version=v$TAG_NAME" >> $GITHUB_OUTPUT
# Commit all changed files back to the repository
- uses: planetscale/ghcommit-action@6ca6b06e9d2de1296143831c53e1d601831ba2a2
- name: commit to the branch
id: commit
uses: planetscale/ghcommit-action@6ca6b06e9d2de1296143831c53e1d601831ba2a2
with:
commit_message: "🤖 Update version to ${{ steps.update_version.outputs.rc_version }}"
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Set output
id: output
run: |
if [[ "${{ steps.commit.conclusion }}" == "skipped" ]]; then
echo "was_skipped=true" >> $GITHUB_OUTPUT
else
echo "was_skipped=false" >> $GITHUB_OUTPUT
fi

0 comments on commit cee5c8a

Please sign in to comment.