ci: make upload artifact not error because of false duplications #32
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
# This is a basic workflow to help you get started with Actions | |
name: Release | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
tags: | |
- "**" | |
# branches: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
jobs: | |
# we build most things from ubuntu: linux specific ones and also portable things (i.e. js-vm) | |
build-linux: | |
name: Build JS and native CPP linux | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Fetch at least 2 commits so that Iceberg doesn't break | |
run: git fetch --unshallow | |
- name: Fetch at main so that Iceberg doesn't break | |
run: git fetch origin main | |
- name: "Determine tag" | |
if: "${{ github.event_name }} == 'push' && ${{ github.ref_type }} == 'tag'" | |
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV" | |
shell: "bash" | |
- name: Package JS | |
if: matrix.os == 'ubuntu-latest' | |
run: make release-js | |
- name: Package CPP | |
run: make release-cpp | |
- name: Upload cpp vm for Linux and js | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/eggjs-${{env.RELEASE_TAG}}.tar.gz,build/eggjs-${{env.RELEASE_TAG}}.zip,build/eggcpp-${{ env.RELEASE_TAG }}.tar.gz" | |
allowUpdates: true | |
#only needed for windows-specific stuff (i.e. cpp-vm exe) | |
build-win: | |
name: Build native CPP windows | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Fetch at least 2 commits so that Iceberg doesn't break | |
run: git fetch --unshallow | |
- name: Fetch at main so that Iceberg doesn't break | |
run: git fetch origin main | |
- name: "Determine tag" | |
if: "${{ github.event_name }} == 'push' && ${{ github.ref_type }} == 'tag'" | |
run: "echo \"RELEASE_TAG=${GITHUB_REF#refs/tags/}\" >> $GITHUB_ENV" | |
shell: "bash" | |
- name: Set up rsync and zip on Windows # needed for packaging | |
run: choco install rsync zip --yes | |
- name: Package CPP | |
run: make release-cpp | |
- name: Upload cpp vm for Windows | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "build/eggcpp-${{ env.RELEASE_TAG }}.zip" | |
allowUpdates: true |