diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1535ea744e073cd23d10d65f55acde408d296835..c173c98b02c95b2a172d2df1d970954d06d6c314 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: @@ -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 @@ -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 }} diff --git a/README.md b/README.md index 4c8f7b142b82443cdab1027dc224d9119b90fc81..3614f94a2ac07b803c77b0fac2516c228f948e6f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/upgrade-from-v1-to-v2.md b/docs/upgrade-from-v1-to-v2.md new file mode 100644 index 0000000000000000000000000000000000000000..53b4378839de86e88aac7bf58f3ab4a0f695d94f --- /dev/null +++ b/docs/upgrade-from-v1-to-v2.md @@ -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>"` | diff --git a/go.mod b/go.mod index ac0cb2ae95c73021318885dbb1f746acdce495a3..1b6411da89bd9cf8084e807bbc173f33e58f565d 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/scripts/release b/scripts/release index 57dd3475ac6a207946f86f02c029cf9f305bc7c1..43465bee9321ed564fa28aad83edcc9b9414f930 100755 --- a/scripts/release +++ b/scripts/release @@ -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" @@ -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