Skip to content

Commit c59b4f1

Browse files
feat: add apple silicon support, closes #106
1 parent cb2ff17 commit c59b4f1

File tree

5 files changed

+40
-38
lines changed

5 files changed

+40
-38
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
16-
- name: golangci-lint
17-
run: |
18-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s
19-
./bin/golangci-lint run -v
16+
- uses: golangci/golangci-lint-action@v2
2017

2118
build:
2219
name: Build and Run
@@ -29,7 +26,7 @@ jobs:
2926
steps:
3027
- uses: actions/setup-go@v2
3128
with:
32-
go-version: 1.15
29+
go-version: 1.16
3330
- uses: actions/checkout@v2
3431
- run: go build ./cmd/semantic-release/
3532
env:
@@ -47,7 +44,7 @@ jobs:
4744
steps:
4845
- uses: actions/setup-go@v2
4946
with:
50-
go-version: 1.15
47+
go-version: 1.16
5148
- uses: actions/setup-node@v1
5249
with:
5350
node-version: 10.x
@@ -56,9 +53,17 @@ jobs:
5653
- run: |
5754
go get github.com/mitchellh/gox
5855
go get github.com/tcnksm/ghr
56+
- uses: docker/login-action@v1
57+
with:
58+
registry: ghcr.io
59+
username: ${{ github.actor }}
60+
password: ${{ secrets.GITHUB_TOKEN }}
61+
- uses: docker/login-action@v1
62+
with:
63+
registry: registry.gitlab.com
64+
username: ${{ secrets.GITLAB_USER }}
65+
password: ${{ secrets.GITLAB_TOKEN }}
5966
- run: ./scripts/release || exit 0
6067
env:
6168
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6269
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
63-
GITLAB_USER: ${{ secrets.GITLAB_USER }}
64-
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}

README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@
88
99
A more lightweight and standalone version of [semantic-release](https://github.com/semantic-release/semantic-release).
1010

11-
## 🚨 Upgrade to semantic-release v2 🚨
12-
13-
`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:
14-
15-
```
16-
curl -SL https://get-release.xyz/semantic-release/linux/amd64/1.22.1 -o ./semantic-release && chmod +x ./semantic-release
17-
```
18-
19-
### Breaking changes
20-
21-
* It is now necessary to use **double dashes** for CLI flags (e.g. `--dry`)
22-
* **Travis CI** support has been **removed**
23-
* Some CLI flags have changed:
24-
25-
| v1 | v2 |
26-
|:--------------------------:|:------------------------------------------------:|
27-
| `-vf` | `-f` |
28-
| `--noci` | `--no-ci` |
29-
| `--ghe-host <host>` | `--provider-opt "github_enterprise_host=<host>"` |
30-
| `--travis-com` | _removed_ |
31-
| `--gitlab` | `--provider gitlab` |
32-
| `--gitlab-base-url <url>` | `--provider-opt "gitlab_baseurl=<url>"` |
33-
| `--gitlab-project-id <id>` | `--provider-opt "gitlab_projectid=<id>"` |
34-
| `--slug` | `--provider-opt "slug=<url>"` |
35-
3611
## How does it work?
3712
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.
3813

docs/upgrade-from-v1-to-v2.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## 🚨 Upgrade to semantic-release v2 🚨
2+
3+
`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:
4+
5+
```
6+
curl -SL https://get-release.xyz/semantic-release/linux/amd64/1.22.1 -o ./semantic-release && chmod +x ./semantic-release
7+
```
8+
9+
### Breaking changes
10+
11+
* It is now necessary to use **double dashes** for CLI flags (e.g. `--dry`)
12+
* **Travis CI** support has been **removed**
13+
* Some CLI flags have changed:
14+
15+
| v1 | v2 |
16+
|:--------------------------:|:------------------------------------------------:|
17+
| `-vf` | `-f` |
18+
| `--noci` | `--no-ci` |
19+
| `--ghe-host <host>` | `--provider-opt "github_enterprise_host=<host>"` |
20+
| `--travis-com` | _removed_ |
21+
| `--gitlab` | `--provider gitlab` |
22+
| `--gitlab-base-url <url>` | `--provider-opt "gitlab_baseurl=<url>"` |
23+
| `--gitlab-project-id <id>` | `--provider-opt "gitlab_projectid=<id>"` |
24+
| `--slug` | `--provider-opt "slug=<url>"` |

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/go-semantic-release/semantic-release/v2
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/Masterminds/semver/v3 v3.1.0

scripts/release

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ set -euo pipefail
66
export VERSION=$(cat .version)
77

88
export CGO_ENABLED=0
9-
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/
9+
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/
1010

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

1414
# docker build
15-
export IMAGE_NAME="docker.pkg.github.com/go-semantic-release/semantic-release/semantic-release"
15+
export IMAGE_NAME="ghcr.io/go-semantic-release/semantic-release"
1616
export IMAGE_NAME_VERSION="$IMAGE_NAME:$VERSION"
1717
export GL_IMAGE_NAME="registry.gitlab.com/go-semantic-release/semantic-release"
1818
export GL_IMAGE_NAME_VERSION="$GL_IMAGE_NAME:$VERSION"
@@ -23,12 +23,10 @@ docker tag $IMAGE_NAME_VERSION $GL_IMAGE_NAME
2323
docker tag $IMAGE_NAME_VERSION $GL_IMAGE_NAME_VERSION
2424

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

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

0 commit comments

Comments
 (0)