Skip to content

v1.4.0-rc.2

v1.4.0-rc.2 #177

Workflow file for this run

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: Pull IOTA SDK bindings
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'iotaledger/iota-sdk-native-bindings'
# For now use 'latest'
#version: 'tags/v0.1.0'
regex: true
file: ".*"
target: 'sdk/'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Tar temporary artifacts
run: tar --exclude='temp.tar' -cf temp.tar ./
- name: Upload temporary artifacts
uses: actions/upload-artifact@v4
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.21.0
steps:
- name: Create dist folder
run: mkdir /dist && cd /dist/
- name: Download temporary artifacts
uses: actions/download-artifact@v4
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 --debug --clean -f ./tools/wasp-cli/.goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-docker:
needs: setup
environment: release
name: Release Docker
runs-on: ubuntu-latest
outputs:
version: ${{ steps.tagger.outputs.tag }}
steps:
- name: Download temporary artifacts
uses: actions/download-artifact@v4
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: Extract CLI metadata (tags, labels) for Docker
id: meta-cli
uses: docker/metadata-action@v5
with:
images: iotaledger/sandbox-wasp-cli
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 WASP to Dockerhub
uses: docker/build-push-action@v6
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 }}
- name: Build and push WASP CLI to Dockerhub
uses: docker/build-push-action@v6
with:
context: .
file: ./tools/wasp-cli/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta-cli.outputs.tags }},iotaledger/sandbox-wasp-cli:latest
labels: ${{ steps.meta-cli.outputs.labels }}
build-args: |
BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/components/app.Version=${{ steps.tagger.outputs.tag }}
# Push wasp-cli README to Docker Hub
- name: git checkout
uses: actions/checkout@v4
- name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }}
DOCKER_PASS: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }}
with:
destination_container_repo: iotaledger/sandbox-wasp-cli
provider: dockerhub
short_description: 'wasp-cli is a command line tool for interacting with IOTA Wasp and its smart contracts.'
readme_file: 'tools/wasp-cli/README.md'
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 }}