Skip to content

Commit

Permalink
fix: website version bump workflow (#1051)
Browse files Browse the repository at this point in the history
* fix: use correct token var in website version bump workflow

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* verify fix

* fix: website version bump

* fix: website version bump

* fix: website version bump

* fix: website version bump

* fix: website version bump

* fix: website version bump

* fix: website version bump

* fix: website version bump

* fix: website version bump

* test using github token

* fix: website version bump
  • Loading branch information
setchy authored Apr 19, 2024
1 parent e0b88e4 commit 9a12faa
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,43 @@ on:

jobs:
update-website:
name: Website
name: Update Website Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout website repository
uses: actions/checkout@v4
with:
repository: gitify-app/website
token: ${{ secrets.GH_TOKEN }}
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3

- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- id: version
run: echo "version=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')" >> $GITHUB_OUTPUT
- run: pnpm version ${{ steps.version.outputs.version }}
- uses: peter-evans/create-pull-request@v6

- name: Bump version to latest tag
run: echo "GITIFY_VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')" >> $GITHUB_OUTPUT

- name: Setup git config
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Bump version to latest
run: pnpm version ${{ env.GITIFY_VERSION }}

- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'docs: update latest release to ${{ steps.version.outputs.version }}'
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: 'bump/${{ steps.version.outputs.version }}'
token: ${{ secrets.GH_TOKEN }}
branch: "bump/${{ env.GITIFY_VERSION }}"
delete-branch: true
title: 'docs: update latest release to ${{ steps.version.outputs.version }}'
title: |
docs: update to latest release version ${{ env.GITIFY_VERSION }}
body: |
Update latest release to ${{ steps.version.outputs.version }}
Automated update to latest release version ${{ env.GITIFY_VERSION }}
labels: |
documentation

0 comments on commit 9a12faa

Please sign in to comment.