forked from bazelbuild/bazel-toolchains
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release workflow & license headers (bazelbuild#938)
* Add go releaser config * Minor change * Remove tags * Add tag script * chmod * fix script * release config update * remove tag script * comments & license headers
- Loading branch information
Showing
6 changed files
with
155 additions
and
0 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,47 @@ | ||
# Copyright 2021 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# Triggers a new Github release via Github Actions | ||
# (https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions) and | ||
# using Go releaser (https://github.com/goreleaser/goreleaser) whenever a new tag is created in this | ||
# repository. The goal is to release pre-built binaries of the Go CLI tools hosted in this repo. | ||
# See .goreleaser.yml for the Go releaser config. | ||
name: goreleaser | ||
|
||
# Trigger only when a new tag is created. | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.15 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,52 @@ | ||
# Copyright 2021 The Bazel Authors. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# goreleaser config. See http://goreleaser.com for details. Builds and releases the Bazel C++/Java | ||
# remote execution toolchain generator as pre-built binaries. | ||
before: | ||
# Make Go pre-download all dependencies before building any binaries to avoid clobbering parallel | ||
# builds. | ||
hooks: | ||
- go mod download | ||
builds: | ||
- id: rbe_configs_gen | ||
env: | ||
main: ./cmd/rbe_configs_gen/rbe_configs_gen.go | ||
binary: rbe_configs_gen | ||
goos: | ||
- linux | ||
# Windows is untested. | ||
- windows | ||
goarch: | ||
- amd64 | ||
# Set the binary timestamp to the commit timestamp it's being | ||
# built from to make the produced binaries deterministic. | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
archives: | ||
- | ||
# Only upload binary assets. | ||
format: binary | ||
# Define how the prebuilt binaries uploaded as release assets are named. The default includes the | ||
# version string in the binary name which is redundant because it is already included in the | ||
# release asset's URL. | ||
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}" | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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
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
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
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