forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 2
release-action
#2
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
Draft
kousu
wants to merge
14
commits into
main
Choose a base branch
from
release-action
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
09759b0
Workflow to build and release the current tag.
kousu 75aba36
Workflow to automatically sync with upstream.
kousu d2beaa8
Enable actuallying syncing all tags.
kousu b2d8c71
Trigger a build when pushing a new *-git-annex tag.
kousu 005fce1
Actually zero the release notes
kousu 41ff3af
--unshallow the upstream tags
kousu 5b803f6
Allow blank issues
kousu b6ac4a0
Bump to github-app-token 1.7.0
kousu 1d362d5
Bump actions.
kousu 2155044
Bump to go 1.19
kousu f99476e
Enable PAM builds
kousu fb21b92
lint
kousu e50657e
YAML lint
kousu 2dd57d1
Attempt to pare down tag release action to something that works
elhil 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 hidden or 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,4 +1,3 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Security Concern | ||
url: https://tinyurl.com/security-gitea | ||
|
This file contains hidden or 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
This file contains hidden or 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,61 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
# This second trigger covers the case where you | ||
# delete and recreate from an existing tag | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install toolchain | ||
run: | | ||
sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y make git xz-utils libpam0g-dev | ||
# per README.md, building needs Go 1.19 and Node LTS | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '^1.19' # The Go version to download (if necessary) and use. | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: Build Release Assets | ||
# The officially releases use 'make release' (https://github.com/neuropoly/gitea/blob/65e42f83e916af771a51af6a3f8db483ffa05c05/.drone.yml#L772) | ||
# but that does cross-compilation (via docker (via https://github.com/techknowlogick/xgo)) | ||
# which is overhead and complication I don't need or want to deal with. | ||
# | ||
# Instead, just do native Linux compilation then pretend we did 'make release'. | ||
run: | | ||
TAGS="bindata sqlite sqlite_unlock_notify pam" make build | ||
mkdir -p dist/release | ||
cp -p gitea dist/release/gitea-"$(git describe --tags --always)"-linux-amd64 | ||
|
||
- name: Compress Release Assets | ||
run: | | ||
xz -k dist/release/* | ||
|
||
- name: Checksum Release Assets | ||
# each release asset in the official build process gets a separate .sha256 file | ||
# which means we need a loop to emulate it | ||
run: | | ||
(cd dist/release; for asset in *; do sha256sum "$asset" > "$asset".sha256; done) | ||
|
||
- name: Upload Release | ||
# this Action creates the release if not yet created | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
kousu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# We don't have .drone.yml's pretty changelog | ||
# generator, so just empty the release notes | ||
# ('' doesn't work, it needs at least one character) | ||
body: '.' | ||
files: 'dist/release/*' | ||
fail_on_unmatched_files: true |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.