v1.0.0-rc.3 #112
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
setup: | |
name: Setup repository | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Tar temporary artifacts | |
run: tar --exclude='temp.tar' -cf temp.tar ./ | |
- name: Upload temporary artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wasp | |
path: temp.tar | |
retention-days: 1 | |
- name: Set up Node | |
uses: actions/[email protected] | |
with: | |
node-version: "14" | |
- name: Install dependencies | |
run: npm install @slack/webhook | |
binaries: | |
needs: setup | |
name: Release wasp-cli Binaries | |
runs-on: ubuntu-latest | |
container: | |
image: iotaledger/goreleaser-cgo-cross-compiler:1.20.2 | |
steps: | |
- name: Create dist folder | |
run: mkdir /dist && cd /dist/ | |
- name: Download temporary artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: wasp | |
- name: Untar temporary artifacts, cleanup and set correct permissions | |
run: tar -xf temp.tar && rm temp.tar && chown -R root:root . | |
- name: Release wasp-cli | |
run: goreleaser --clean -f ./tools/wasp-cli/.goreleaser.yml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release-docker: | |
needs: setup | |
name: Release Docker | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.tagger.outputs.tag }} | |
steps: | |
- name: Download temporary artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: wasp | |
- name: Untar temporary artifacts and cleanup | |
run: tar -xf temp.tar && rm temp.tar | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Query git tag | |
id: tagger | |
uses: jimschubert/query-tag-action@v2 | |
with: | |
include: "v*" | |
exclude: "" | |
commit-ish: "HEAD" | |
skip-unshallow: "true" | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: iotaledger/wasp | |
tags: | | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=match,pattern=v(\d+.\d+),suffix=-alpha,group=1,enable=${{ contains(github.ref, '-alpha') }} | |
type=match,pattern=v(\d+.\d+),suffix=-beta,group=1,enable=${{ contains(github.ref, '-beta') }} | |
type=match,pattern=v(\d+.\d+),suffix=-rc,group=1,enable=${{ contains(github.ref, '-rc') }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }} | |
password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }} | |
- name: Build and push to Dockerhub | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }},iotaledger/wasp:latest | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/components/app.Version=${{ steps.tagger.outputs.tag }} | |
release-iscmagic: | |
uses: ./.github/workflows/publish-iscmagic.yml | |
needs: release-docker | |
with: | |
version: ${{ needs.release-docker.outputs.version }} | |
secrets: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
release-iscutils: | |
uses: ./.github/workflows/publish-iscutils.yml | |
needs: release-docker | |
with: | |
version: ${{ needs.release-docker.outputs.version }} | |
secrets: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |