-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from SaladTechnologies/internalize-reallocation
0.5.0 - Improved reallocation, state file, and more
- Loading branch information
Showing
11 changed files
with
1,520 additions
and
780 deletions.
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- ".github/**" | ||
- "**.md" | ||
- "**.png" | ||
- ".gitignore" | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build-binary | ||
|
||
- name: Get version from package.json | ||
id: version | ||
run: echo ::set-output name=version::$(node -p "require('./package.json').version") | ||
|
||
- name: Get the PR that was merged into main | ||
id: pr | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { data: pulls } = await github.rest.pulls.list({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'closed', | ||
base: 'main', | ||
sort: 'updated', | ||
direction: 'desc', | ||
per_page: 1 | ||
}); | ||
const pr = pulls[0]; | ||
// Set the title and body as outputs | ||
return { | ||
title: pr.title, | ||
body: pr.body | ||
}; | ||
- name: Make outputs of previous step available | ||
id: pr-output | ||
run: | | ||
echo "::set-output name=title:$(echo ${{ steps.pr.outputs.result }} | jq -r '.title')" | ||
echo "::set-output name=body::$(echo ${{ steps.pr.outputs.result }} | jq -r '.body')" | ||
- name: Create a release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.version.outputs.version }} | ||
release_name: ${{ steps.pr-output.outputs.title }} | ||
body: ${{ steps.pr-output.outputs.body }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload release artifacts | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ steps.version.outputs.version }} ./bin/kelpie#Linux_x64 --clobber | ||
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build Release Candidate | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
- "**.png" | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build-binary | ||
|
||
- name: Archive production artifacts | ||
id: archive | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: bin/kelpie | ||
name: kelpie-${{ github.sha }} | ||
|
||
- name: Comment on PR with link | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `:rocket: [Download the latest release candidate](${{ steps.archive.outputs.artifact-url }}) :rocket:` | ||
}) | ||
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 |
---|---|---|
@@ -1 +1 @@ | ||
v18.19.0 | ||
v20.12.2 |
Oops, something went wrong.