Improve GitHub Actions template
See original GitHub issueIs your feature request related to a problem? Please describe. The CI template that Ship.js provides is not correct for people wants to use Release Snapshot.
Describe the solution you’d like Add example CI configs at “Release Snapshot” section.
Describe alternatives you’ve considered Add example config. For example GitHub Actions:
name: Ship js trigger
on:
+ pull_request:
+ types:
+ - closed
- push:
- branches:
- - develop
jobs:
build:
name: Release
runs-on: ubuntu-latest
+ if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/v')
steps:
- uses: actions/checkout@v2
with:
ref: develop
+ fetch-depth: 0
- uses: actions/setup-node@v1
with:
registry-url: "https://registry.npmjs.org"
- run: |
if [ -f "yarn.lock" ]; then
yarn install
else
npm install
fi
- run: npx shipjs trigger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
CircleCi is… I don’t know about that very much😅
Additional context
Or add step when use npx shipjs setup
.
Do you want to use "Release Snapshot"? y/N
.
If we add this step, we should refactor addCircleCIConfig.js
and addGitHubActions.js
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Finding and customizing actions - GitHub Docs
Actions are the building blocks that power your workflow. A workflow can contain actions created by the community, or you can create your...
Read more >GitHub actions templates - Codewrecks
A better approach is creating one single template repository and then reuse that repository as action template in other repositories. Usually ...
Read more >GitHub Actions Performance Improvement for your CI/CD
Caching node_modules in Workflow. Below is one example how can you add actions/cache@v2 action in your GitHub workflow. We want to cache ...
Read more >Improve Your DevOps Workflow With GitHub Actions
Inside that file, add the following: name: example # Run this workflow every time a new commit pushed to your repository on: push...
Read more >Creating Custom GitHub Actions - This Dot Labs
Since its generally available release in Nov 2019, Github Actions has seen an incredible increase in adoptions. Github Actions allows you to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tyankatsu0105 yes, the flow will run on every pr closed, which is not ideal, but the flow gets closed.
You can change the staging branch name with this config. It is not documented, but it works.
Maybe we should use
startsWith(github.head_ref, 'releases/v')
as you said. GitHub provides this better control which CircleCI doesn’t have. So we should leverage that.And if we later document
getStagingBranchName
then we will putWARNING
so that they can update their github workflow as well.Okay, let’s 🛳 it
Umm… @eunjae-lee If not use
startsWith(github.head_ref, 'releases/v')
, this flow will run every PR is closed. It’s not good.Btw, How can we change the release branch name?