Last active
August 19, 2024 15:40
-
-
Save mislav/b9fa0885660b4c10d41b039022fd2209 to your computer and use it in GitHub Desktop.
Using GitHub CLI from GitHub Actions
This file contains 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 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