Last active
August 19, 2024 15:40
Using GitHub CLI from GitHub Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-merge | |
on: | |
pull_request: | |
types: [opened] | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Enable auto-merge for new PRs | |
run: gh pr merge --auto --merge "$PR_URL" | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build and upload | |
run: | | |
# First, build some files to `dist/*`. Then: | |
gh release create "${GITHUB_REF#refs/tags/}" dist/*.tgz dist/*.zip | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment