Skip to content

Commit

Permalink
feat: add apple silicon support, closes #106
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Jul 27, 2021
1 parent cb2ff17 commit c59b4f1
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 38 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s
./bin/golangci-lint run -v
- uses: golangci/golangci-lint-action@v2

build:
name: Build and Run
Expand All @@ -29,7 +26,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16
- uses: actions/checkout@v2
- run: go build ./cmd/semantic-release/
env:
Expand All @@ -47,7 +44,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16
- uses: actions/setup-node@v1
with:
node-version: 10.x
Expand All @@ -56,9 +53,17 @@ jobs:
- run: |
go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v1
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USER }}
password: ${{ secrets.GITLAB_TOKEN }}
- run: ./scripts/release || exit 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITLAB_USER: ${{ secrets.GITLAB_USER }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,6 @@
A more lightweight and standalone version of [semantic-release](https://github.com/semantic-release/semantic-release).

## 🚨 Upgrade to semantic-release v2 🚨

`semantic-release` v2 is now available. If you run into any problems, please create a [GitHub issue](https://github.com/go-semantic-release/semantic-release/issues/new). You can always downgrade to v1 with:

```
curl -SL https://get-release.xyz/semantic-release/linux/amd64/1.22.1 -o ./semantic-release && chmod +x ./semantic-release
```

### Breaking changes

* It is now necessary to use **double dashes** for CLI flags (e.g. `--dry`)
* **Travis CI** support has been **removed**
* Some CLI flags have changed:

| v1 | v2 |
|:--------------------------:|:------------------------------------------------:|
| `-vf` | `-f` |
| `--noci` | `--no-ci` |
| `--ghe-host <host>` | `--provider-opt "github_enterprise_host=<host>"` |
| `--travis-com` | _removed_ |
| `--gitlab` | `--provider gitlab` |
| `--gitlab-base-url <url>` | `--provider-opt "gitlab_baseurl=<url>"` |
| `--gitlab-project-id <id>` | `--provider-opt "gitlab_projectid=<id>"` |
| `--slug` | `--provider-opt "slug=<url>"` |

## How does it work?
Instead of writing [meaningless commit messages](http://whatthecommit.com/), we can take our time to think about the changes in the codebase and write them down. Following the [AngularJS Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit) it is then possible to generate a helpful changelog and to derive the next semantic version number from them.

Expand Down
24 changes: 24 additions & 0 deletions docs/upgrade-from-v1-to-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## 🚨 Upgrade to semantic-release v2 🚨

`semantic-release` v2 is now available. If you run into any problems, please create a [GitHub issue](https://github.com/go-semantic-release/semantic-release/issues/new). You can always downgrade to v1 with:

```
curl -SL https://get-release.xyz/semantic-release/linux/amd64/1.22.1 -o ./semantic-release && chmod +x ./semantic-release
```

### Breaking changes

* It is now necessary to use **double dashes** for CLI flags (e.g. `--dry`)
* **Travis CI** support has been **removed**
* Some CLI flags have changed:

| v1 | v2 |
|:--------------------------:|:------------------------------------------------:|
| `-vf` | `-f` |
| `--noci` | `--no-ci` |
| `--ghe-host <host>` | `--provider-opt "github_enterprise_host=<host>"` |
| `--travis-com` | _removed_ |
| `--gitlab` | `--provider gitlab` |
| `--gitlab-base-url <url>` | `--provider-opt "gitlab_baseurl=<url>"` |
| `--gitlab-project-id <id>` | `--provider-opt "gitlab_projectid=<id>"` |
| `--slug` | `--provider-opt "slug=<url>"` |
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/go-semantic-release/semantic-release/v2

go 1.15
go 1.16

require (
github.com/Masterminds/semver/v3 v3.1.0
Expand Down
6 changes: 2 additions & 4 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ set -euo pipefail
export VERSION=$(cat .version)

export CGO_ENABLED=0
gox -parallel 4 -osarch="linux/amd64 darwin/amd64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w -X main.SRVERSION=$VERSION" -output="bin/{{.Dir}}_v"$VERSION"_{{.OS}}_{{.Arch}}" ./cmd/semantic-release/
gox -parallel 4 -osarch="linux/amd64 darwin/amd64 darwin/arm64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w -X main.SRVERSION=$VERSION" -output="bin/{{.Dir}}_v"$VERSION"_{{.OS}}_{{.Arch}}" ./cmd/semantic-release/

cd bin/ && shasum -a 256 * > ./semantic-release_v${VERSION}_checksums.txt && cd -
ghr $(cat .ghr) bin/

# docker build
export IMAGE_NAME="docker.pkg.github.com/go-semantic-release/semantic-release/semantic-release"
export IMAGE_NAME="ghcr.io/go-semantic-release/semantic-release"
export IMAGE_NAME_VERSION="$IMAGE_NAME:$VERSION"
export GL_IMAGE_NAME="registry.gitlab.com/go-semantic-release/semantic-release"
export GL_IMAGE_NAME_VERSION="$GL_IMAGE_NAME:$VERSION"
Expand All @@ -23,12 +23,10 @@ docker tag $IMAGE_NAME_VERSION $GL_IMAGE_NAME
docker tag $IMAGE_NAME_VERSION $GL_IMAGE_NAME_VERSION

# push to GitHub Docker Registry
docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
docker push $IMAGE_NAME_VERSION
docker push $IMAGE_NAME

# push to GitLab Docker Registry
docker login registry.gitlab.com -u $GITLAB_USER -p $GITLAB_TOKEN
docker push $GL_IMAGE_NAME_VERSION
docker push $GL_IMAGE_NAME

Expand Down

0 comments on commit c59b4f1

Please sign in to comment.