Skip to content

Commit

Permalink
Merge pull request #18 from codecov/th/push-changes-to-extensions
Browse files Browse the repository at this point in the history
chore(deps): create workflows to push tagged versions
  • Loading branch information
thomasrockhu-codecov authored Nov 8, 2024
2 parents 3c4934a + c90ac9b commit 4c4c177
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/push-tag-to-extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Push new tagged version
on:
workflow_dispatch:
push:
# Pattern matched against refs/tags
tags:
- '*'
jobs:
bitrise-step:
runs-on: ubuntu-latest
steps:
- name: Run version
run: ./scripts/version.sh
- name: Checkout
uses: ./.github/workflows/push-tag.yml@main
with:
repository: "codecov/codecov-bitrise"
version: ${{ env.CODECOV_WRAPPER_VERSION }}
53 changes: 53 additions & 0 deletions .github/workflows/push-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Push tag to extension
on:
workflow_call:
inputs:
repository:
required: true
type: string
version:
required: true
type: string

jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}

- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.RELEASER_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true

- name: Create release branch
run: git checkout -b release/wrapper/${{ inputs.version }}

- name: Pull latest wrapper
run: |
git submodule update --init --recursive --remote
- name: Make commit
run: |
git commit -S --message "chore(release): wrapper-${{ inputs.version }}"
git push origin release/wrapper/${{ inputs.version }}
- name: Install GitHub CLI
uses: dev-hanz-ops/[email protected]

- name: Create pull request into main
run: |
gh pr create --title "chore(release): wrapper-${{ inputs.version}}" --body "---" --base "main"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4c4c177

Please sign in to comment.