Skip to content

Commit

Permalink
fix: Update realization of saving artifacts, keep original logic, ext…
Browse files Browse the repository at this point in the history
…end only date based part
  • Loading branch information
dmvict committed Aug 24, 2023
1 parent 321c12e commit e9e90c4
Showing 1 changed file with 49 additions and 16 deletions.
65 changes: 49 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ jobs:
yarn install
yarn test
- name: Get formatted date
id: date
if: ${{ inputs.publish || github.event_name == 'schedule' }}
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Upload binaries to release tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.publish || github.event_name == 'schedule' }}
Expand All @@ -151,7 +146,23 @@ jobs:
file: ./nargo-${{ matrix.target }}.tar.gz
asset_name: nargo-${{ matrix.target }}.tar.gz
overwrite: true
tag: ${{ inputs.tag || format('{0}-{1}', 'nightly', steps.date.outputs.date) }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)

- name: Get formatted date
id: date
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Upload binaries to nightly release with date tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.zip
asset_name: nargo-${{ matrix.target }}.zip
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}

build-linux:
needs: [build-barretenberg]
Expand Down Expand Up @@ -234,11 +245,6 @@ jobs:
yarn install
yarn test
- name: Get formatted date
id: date
if: ${{ inputs.publish || github.event_name == 'schedule' }}
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Upload binaries to release tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.publish || github.event_name == 'schedule' }}
Expand All @@ -248,7 +254,23 @@ jobs:
file: ./nargo-${{ matrix.target }}.tar.gz
asset_name: nargo-${{ matrix.target }}.tar.gz
overwrite: true
tag: ${{ inputs.tag || format('{0}-{1}', 'nightly', steps.date.outputs.date) }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)

- name: Get formatted date
id: date
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Upload binaries to nightly release with date tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.zip
asset_name: nargo-${{ matrix.target }}.zip
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}

build-windows:
needs: [build-barretenberg]
Expand Down Expand Up @@ -323,18 +345,29 @@ jobs:
yarn install
yarn test
- name: Upload binaries to release tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.publish || github.event_name == 'schedule' }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.zip
asset_name: nargo-${{ matrix.target }}.zip
overwrite: true
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)

- name: Get formatted date
id: date
if: ${{ inputs.publish || github.event_name == 'schedule' }}
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Upload binaries to release tag
- name: Upload binaries to nightly release with date tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.publish || github.event_name == 'schedule' }}
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.zip
asset_name: nargo-${{ matrix.target }}.zip
overwrite: true
tag: ${{ inputs.tag || format('{0}-{1}', 'nightly', steps.date.outputs.date) }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}

0 comments on commit e9e90c4

Please sign in to comment.