From 15ff51f225e48509dafce759dfd009b085879fda Mon Sep 17 00:00:00 2001 From: Theofanis Petkos Date: Thu, 29 Jun 2023 17:30:33 +0100 Subject: [PATCH] Add binaries to every new release (#237) * Add release yaml to workflows Signed-off-by: thepetk * Remove autogeneration of release notes Signed-off-by: thepetk * Update readme Signed-off-by: thepetk * Update Readme.md Signed-off-by: thepetk --------- Signed-off-by: thepetk --- .github/workflows/release.yaml | 54 ++++++++++++++++++++++++++++++++++ README.md | 14 ++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..7ba9991b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,54 @@ +on: + push: + tags: + - 'v*' + +name: Build Release + +defaults: + run: + shell: bash + +permissions: + contents: write + +jobs: + release: + name: Create Release + runs-on: 'ubuntu-latest' + strategy: + matrix: + goosarch: + - 'darwin/amd64' + - 'linux/amd64' + - 'linux/ppc64le' + - 'linux/s390x' + - 'windows/amd64' + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-go@v4 + with: + go-version: '1.19.5' + - name: Get OS and arch info + run: | + GOOSARCH=${{matrix.goosarch}} + GOOS=${GOOSARCH%/*} + GOARCH=${GOOSARCH#*/} + BINARY_NAME=alizer-$GOOS-$GOARCH + echo "BINARY_NAME=$BINARY_NAME" >> $GITHUB_ENV + echo "GOOS=$GOOS" >> $GITHUB_ENV + echo "GOARCH=$GOARCH" >> $GITHUB_ENV + - name: Build + run: | + cd go/ + go build -o "$BINARY_NAME" -v + - name: Release with Notes and Binaries + uses: softprops/action-gh-release@v1 + with: + draft: false + files: go/${{env.BINARY_NAME}} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index cfaebf1f..a32a612e 100644 --- a/README.md +++ b/README.md @@ -160,9 +160,21 @@ For information on getting started, refer to the [CONTRIBUTING instructions](CON The release process of `alizer` is very straightforward. You can create a new release [here](https://github.com/redhat-developer/alizer/releases/new). -- The _title_ of the release has to be the new version. `Alizer` follows the `{major}.{minor}.{bugfix}` format (e.g `0.1.0`) +- The _title_ of the release has to be the new version. `Alizer` follows the `v{major}.{minor}.{bugfix}` format (e.g `v0.1.0`) - The _description_ of the release is optional. You may add a description if there were outstanding updates in the project, not mentioned in the issues or PRs of this release. +### Release Binaries +For each release a group of binary files is generated. More detailed we have the following types: +- `linux/amd64` +- `linux/ppc65le` +- `linux/s390x` +- `windows/amd64` +- `darwin/amd64` + +In order to download a binary file: +* Go to the release you are interested for `https://github.com/thepetk/alizer/releases/tag/` +* In the **Assets** section you will see the list of generated binaries for the release. + ## Feedback & Questions If you discover an issue please file a bug and we will fix it as soon as possible.