Skip to content

Experiments

Experiments #16

Workflow file for this run

name: Experiments
on:
workflow_dispatch
jobs:
experiments:
outputs:
# accessible from other jobs as ${{needs.experiments.outputs.version}}
version: ${{steps.version.outputs.version}}
runs-on: windows-latest
steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: 'true'
- name: Print environment
shell: cmd
run: |
echo ----------------------------------------------------
set
echo ====================================================
py -0p
echo ----------------------------------------------------
py -3 -V
py -3 -m pip list
- id: version
name: Version
shell: python
run: |
import os
from datetime import datetime, timezone
date = datetime.now(tz=timezone.utc)
with open(os.getenv('GITHUB_OUTPUT'), "a") as fout:
print( f"version={date.year}.{date.month}.{date.day}.${{github.run_number}}")
fout.write(f"version={date.year}.{date.month}.{date.day}.${{github.run_number}}")
- name: Print version
shell: cmd
run: |
echo -- version is ${{steps.version.outputs.version}}
results:
runs-on: windows-latest
needs: experiments
steps:
- name: Print version
shell: cmd
run: |
echo previous version=${{needs.experiments.outputs.version}}
release:
runs-on: ubuntu-latest
needs: experiments
permissions:
contents: write
steps:
- shell: python
run: |
with open("test.txt", "w") as fout:
fout.write(f"Artifact sample for version ${{needs.experiments.outputs.version}}")
- uses: ncipollo/release-action@v1
with:
tag: release-candidate
artifacts: "test.txt"
body: "Test body"
draft: true
makeLatest: true
allowUpdates: true
updateOnlyUnreleased: true
artifactErrorsFailBuild: true
replacesArtifacts: true