-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adding Release Automation #1122
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
abecc22
Adding release automation step
whizzzkid c392dd9
blocking step
whizzzkid 123ef85
unneeded check
whizzzkid 8648ba1
path renaming
whizzzkid 7fcb39d
Merge branch 'main' into feat/release-automation
whizzzkid 55fc56c
Merge branch 'main' into feat/release-automation
whizzzkid 5845bc4
feat: :recycle: Refactor ci:build:stable
whizzzkid b06eb91
feat: :package: Create Release Asset for Stable Env
whizzzkid cc82db8
Merge branch 'main' into feat/release-automation
whizzzkid e91de0c
Merge branch 'main' into feat/release-automation
whizzzkid a9305bb
Merge branch 'main' into feat/release-automation
SgtPooki d7a3bea
feat: :pushpin: Pinning github-actions versions
whizzzkid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,10 @@ jobs: | |
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3.3.0 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3.6.0 | ||
with: | ||
node-version: 18 | ||
|
||
|
@@ -39,7 +39,7 @@ jobs: | |
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
|
||
- name: Restore .cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3.2.4 | ||
id: cache | ||
with: | ||
path: ${{ github.workspace }}/.cache | ||
|
@@ -50,7 +50,7 @@ jobs: | |
|
||
- name: Restore node_modules | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3.2.4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
@@ -84,11 +84,70 @@ jobs: | |
# - action artifacts can be downloaded for 90 days, then are removed by github | ||
# - binaries in PRs from forks won't be signed | ||
- name: Attach produced packages to Github Action | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3.1.2 | ||
with: | ||
name: built-on-${{ matrix.os }} | ||
path: build/ipfs_companion*.* | ||
if-no-files-found: error | ||
|
||
- name: Show Cache | ||
run: du -h ${{ github.workspace }}/.cache/* || true | ||
|
||
release-pr: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: google-github-actions/[email protected] | ||
with: | ||
release-type: node | ||
package-name: ipfs-companion | ||
changelog-notes-type: github | ||
command: release-pr | ||
Comment on lines
+103
to
+106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This PR can stay around for as long as it's needed, as soon as that gets merged it pushes the release tags. |
||
|
||
release-assets: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
lidel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/[email protected] | ||
|
||
- name: Install Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18 | ||
|
||
- name: Restore .cache | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ github.workspace }}/.cache | ||
key: ${{ runner.os }}-${{ hashFiles('package*json', 'package-lock.json', '*config.js') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ hashFiles('package*json', 'package-lock.json', '*config.js') }} | ||
${{ runner.os }}- | ||
|
||
- name: Restore node_modules | ||
id: yarn-cache | ||
uses: actions/[email protected] | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: npm run ci:install | ||
|
||
- name: Build Stable Release | ||
run: npm run ci:build:stable | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | ||
with: | ||
files: build/*.zip | ||
lidel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
draft: true | ||
append_body: true | ||
body: 'Automated Release, please upload artifacts to respective webstores and mark this draft as released.' |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this only needs to run on
push
after thetests
have succeeded. Creates a release-pr based on conventional-commits commit strategy (which we already follow)This defines what a release PR is: https://github.com/google-github-actions/release-please-action#whats-a-release-pr