Skip to content

chores: add release ci #11

chores: add release ci

chores: add release ci #11

Workflow file for this run

name: Release
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# push: todo fix
# tags:
# - "v*"
permissions:
contents: write
jobs:
Artifact: # Pack and publish to Github Artifact
runs-on: ubuntu-latest
# container:
# image: smartir/smart-ir-builder:main
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Pack #todo
run:
tar -zcvf ir.tgz ./ir_cli/src/abi
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ir-linux-amd64-nightly
path: ir.tgz
# - name: Build the Release
# working-directory: ir_cli
# run: |
# rustup default 1.67
# make release
# ls _build
# - name: Upload Artifact to Github Releases
# uses: actions/upload-artifact@v3
# with:
# name: ir-linux-amd64-nightly
# path: ir_cli/_build/ir.tgz
Docker: # Download from Github Artifact and build Docker image and push
runs-on: ubuntu-latest
needs: [Artifact]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download from Artifact
uses: actions/download-artifact@v3
with:
name: ir-linux-amd64-nightly
path: _build
- name: Check downloaded contents
run: |
tar -xf _build/ir.tgz -C _build/
echo "after unpack"
ls _build/
ls _build/ir_cli
ls _build/ir_cli/abi
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Extract Metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: smartir/smartir
# - name: Build and Push Docker image
# uses: docker/build-push-action@v3
# with:
# context: .
# push: true # ${{ github.event_name != 'pull_request' }}
# tags: v0.1.0 # ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}