bump versions for release (#1942) #191
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: Zombienet Packages Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build_release_for_linux: | |
name: build_release_for_linux | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: npm install | |
working-directory: "./javascript" | |
- run: npm dedupe | |
working-directory: "./javascript" | |
- run: npm run build | |
working-directory: "./javascript" | |
- run: npm run package:linux | |
working-directory: "./javascript" | |
- name: Test if zombienet-linux runs | |
run: ./bins/zombienet-linux-x64 version | |
working-directory: "./javascript" | |
# - name: release | |
# uses: actions/create-release@v1 | |
# id: create_release | |
# with: | |
# draft: false | |
# prerelease: false | |
# release_name: ${{ github.ref }} | |
# tag_name: ${{ github.ref }} | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# - name: upload linux artifact | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./javascript/bins/zombienet-linux-x64 | |
# asset_name: zombienet-linux-x64 | |
# asset_content_type: application/octet-stream | |
# - name: upload linux arm64 artifact | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./javascript/bins/zombienet-linux-arm64 | |
# asset_name: zombienet-linux-arm64 | |
# asset_content_type: application/octet-stream | |
- name: release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
id: create_release | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
./javascript/bins/zombienet-linux-arm64 | |
./javascript/bins/zombienet-linux-x64 | |
build_release_for_mac: | |
name: build_release_for_mac | |
needs: build_release_for_linux | |
strategy: | |
matrix: | |
target: | |
- { runner: macos-13, arch: x64 } | |
- { runner: macos-14, arch: arm64 } | |
runs-on: ${{ matrix.target.runner }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: npm install && npm update | |
working-directory: "./javascript" | |
- run: npm run build | |
working-directory: "./javascript" | |
- run: npm run package:macos:${{ matrix.target.arch }} | |
working-directory: "./javascript" | |
- name: Test if zombienet-mac runs | |
run: ./bins/zombienet-macos-${{ matrix.target.arch }} version | |
working-directory: "./javascript" | |
- name: upload macos artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ needs.build_release_for_linux.outputs.upload_url }} | |
asset_path: ./javascript/bins/zombienet-macos-${{ matrix.target.arch }} | |
asset_name: zombienet-macos-${{ matrix.target.arch }} | |
asset_content_type: application/octet-stream | |
build_push_image: | |
name: Build and Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
environment: tags | |
env: | |
IMAGE_NAME: paritytech/zombienet | |
VERSION: ${{ github.ref_name }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0 | |
- name: npm build | |
run: | | |
cd javascript | |
npm install | |
npm dedupe | |
npm run clean | |
npm run build | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_PASS }} | |
- name: Build Docker image | |
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 | |
with: | |
file: ./scripts/ci/docker/zombienet_injected.Dockerfile | |
context: . | |
push: true | |
tags: | | |
${{ env.IMAGE_NAME }}:${{ env.VERSION }} | |
${{ env.IMAGE_NAME }}:latest |