-
Notifications
You must be signed in to change notification settings - Fork 234
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
automatic release to GitHub #279
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
eb54376
chore: disable update mechanism
ZyanKLee 40eb5c7
chore: remove upx
ZyanKLee 6fd251a
feat: build dev artifact and upload
ZyanKLee e438799
fix: typo
ZyanKLee 1c379a5
feat(signer): allow artifact file to be specified
ZyanKLee a4b38fa
feat(Makefile): append version to artifact name
ZyanKLee 652c36a
feat(ci): create GH release on version tags
ZyanKLee 8b50dcd
feat(release): signer.go with *.tgz, create md5sum
ZyanKLee 536f5b3
chore: add sha512sum
ZyanKLee 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: build dev artifact | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- uses: actions/checkout@v3 | ||
- run: make dev | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux_x64 | ||
path: ${{ github.workspace }}/bin/noisetorch |
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,34 @@ | ||
--- | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- uses: actions/checkout@v3 | ||
- name: Build release artifact | ||
run: | | ||
mkdir -p ~/.config/noisetorch | ||
echo '${{ secrets.NOISETORCH_SIGNER_PRIVKEY_BASE64 }}' | base64 -d > ~/.config/noisetorch/private.key | ||
make release | ||
rm -rf ~/.config/noisetorch/ | ||
for f in bin/NoiseTorch_x64_*.tgz ; do md5sum ${f} | tee ${f}.md5sum ; sha512sum ${f} | tee ${f}.sha512sum ; done | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
${{ github.workspace }}/bin/NoiseTorch_x64_*.tgz | ||
${{ github.workspace }}/bin/NoiseTorch_x64_*.tgz.sig | ||
${{ github.workspace }}/bin/NoiseTorch_x64_*.tgz.md5sum | ||
${{ github.workspace }}/bin/NoiseTorch_x64_*.tgz.sha512sum |
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,5 +1,5 @@ | ||
UPDATE_URL=https://noisetorch.epicgamer.org | ||
UPDATE_PUBKEY=3mL+rBi4yBZ1wGimQ/oSQCjxELzgTh+673H4JdzQBOk= | ||
UPDATE_URL= | ||
UPDATE_PUBKEY=Md2rdsS+b6W0trgcqa5lAWP978Zj0sFmubJ252OPKwc= | ||
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 is the public key that corresponds with the new signer key. They are used to in the end let |
||
VERSION := $(shell git describe --tags) | ||
|
||
dev: rnnoise | ||
|
@@ -18,13 +18,11 @@ release: rnnoise | |
|
||
mkdir -p tmp/.local/bin/ | ||
go generate | ||
CGO_ENABLED=0 GOOS=linux go build -trimpath -tags release -a -ldflags '-s -w -extldflags "-static" -X main.version=${VERSION} -X main.distribution=official -X main.updateURL=${UPDATE_URL} -X main.publicKeyString=${UPDATE_PUBKEY}' . | ||
upx noisetorch | ||
CGO_ENABLED=0 GOOS=linux go build -trimpath -tags release -a -ldflags '-s -w -extldflags "-static" -X main.version=${VERSION} -X main.distribution=official' . | ||
mv noisetorch tmp/.local/bin/ | ||
cd tmp/; \ | ||
tar cvzf ../bin/NoiseTorch_x64.tgz . | ||
tar cvzf ../bin/NoiseTorch_x64_${VERSION}.tgz . | ||
rm -rf tmp/ | ||
go run scripts/signer.go -s | ||
git describe --tags > bin/version.txt | ||
go run scripts/signer.go -s -f bin/NoiseTorch_x64_${VERSION}.tgz | ||
rnnoise: | ||
$(MAKE) -C c/ladspa |
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.
md5sum's are more common and more people know how to use them to verify the integrity of files.
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.
Whoops, sorry, meant to do a comment, not a review, so I deleted that. I'm still partial to doing an sha256sum over an md5 or sha1, given the cheapness of those attacks. At the very least, could we include both md5 and sha256?
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.
I would agree, if this was used to secure anything vital. But it's only a checksum to verify if the file has been altered or is another file altogether. You think this is still a reason to use some more sophisticated checksum algorithm?
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.
oh, well. why not? -> see 536f5b3
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.
Thanks! In reality, there probably isn't a huge amount of risk but it's something that doesn't hurt at all to add :)
I appreciate it getting added to the PR.