diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a7b1b836..76ca6b9f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -9,17 +9,10 @@ jobs: name: Release Dev runs-on: ubuntu-latest - container: - image: goreleaser/goreleaser-cross:v1.19.5 - options: --user root - steps: - name: Checkout uses: actions/checkout@v3 - - name: Set safe directory - run: git config --system --add safe.directory '/__w/archway/archway' - - name: Set short git commit SHA id: vars run: | @@ -37,9 +30,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Install package - run: apt install wget - - name: GoReleaser run: make release env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a9429090..4eb2820f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,17 +9,10 @@ jobs: name: Release runs-on: ubuntu-latest - container: - image: goreleaser/goreleaser-cross:v1.19.5 - options: --user root - steps: - name: Checkout uses: actions/checkout@v3 - - name: Set safe directory - run: git config --system --add safe.directory '/__w/archway/archway' - - name: Set up Go uses: actions/setup-go@v3 with: @@ -31,9 +24,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Install package - run: apt install wget - - name: GoReleaser run: make release env: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f0ce3c27..d55c3c24 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,3 +52,29 @@ jobs: files: ./coverage.txt fail_ci_if_error: true if: env.GIT_DIFF + release-check: + name: Check release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - run: git fetch --prune --unshallow + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: go.mod + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: GoReleaser + run: make release-dryrun + env: + RELEASE: false + GITHUB_TOKEN: "" diff --git a/CHANGELOG.md b/CHANGELOG.md index 28697ae8..bec0039e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Contains all the PRs that improved the code without changing the behaviours. - [#361](https://github.com/archway-network/archway/pull/361) - Readd missing deprecated Dockerhub build phase - [#362](https://github.com/archway-network/archway/pull/362) - wrong reference in the deploy pipeline - [#363](https://github.com/archway-network/archway/pull/363) - move safe dir up in the pipeline +- [#365](https://github.com/archway-network/archway/pull/365) - add release tests ### Fixed diff --git a/Makefile b/Makefile index 03d22cdf..3a218d6f 100644 --- a/Makefile +++ b/Makefile @@ -211,11 +211,11 @@ localnet: release-dryrun: $(DOCKER) run \ --rm \ - -v "$(CURDIR)":/code \ - -w /code \ -e LIBWASM_VERSION=$(LIBWASM_VERSION) \ -e RELEASE=$(RELEASE) \ -v /var/run/docker.sock:/var/run/docker.sock \ + -v `pwd`:/go/src/github.com/archway-network/archway \ + -w /go/src/github.com/archway-network/archway \ goreleaser/goreleaser-cross:$(GORELEASER_VERSION) \ --skip-publish \ --clean \ @@ -224,12 +224,12 @@ release-dryrun: release: $(DOCKER) run \ --rm \ - -v "$(CURDIR)":/code \ - -w /code \ -e LIBWASM_VERSION=$(LIBWASM_VERSION) \ -e RELEASE=$(RELEASE) \ -e GITHUB_TOKEN="$(GITHUB_TOKEN)" \ -v /var/run/docker.sock:/var/run/docker.sock \ + -v `pwd`:/go/src/github.com/archway-network/archway \ + -w /go/src/github.com/archway-network/archway \ goreleaser/goreleaser-cross:$(GORELEASER_VERSION) \ --clean