Skip to content

[patch] Write a workflow that runs tests on the latest conda release #3

[patch] Write a workflow that runs tests on the latest conda release

[patch] Write a workflow that runs tests on the latest conda release #3

name: Experiment with Syntax
on:
pull_request:
jobs:
experiment:
runs-on: ubuntu-latest
outputs:
latest_release_tag: ${{ steps.get-release.outputs.result }}
steps:
# - name: Checkout code
# uses: actions/checkout@v4
- name: Use GitHub Script to get latest release
id: get-release
uses: actions/github-script@v4
with:
result-encoding: string
script: |
const response = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
});
console.log(response.data.tag_name);
return response.data.tag_name
- name: Echo latest release tag
shell: bash -l {0}
run: |
echo "Latest release tag: ${{ steps.get-release.outputs.result }}"
access-latest-release:
needs: get-latest-release

Check failure on line 35 in .github/workflows/experiment-with-ci-syntax.yml

View workflow run for this annotation

GitHub Actions / Experiment with Syntax

Invalid workflow file

The workflow is not valid. .github/workflows/experiment-with-ci-syntax.yml (Line: 35, Col: 12): Job 'access-latest-release' depends on unknown job 'get-latest-release'.
runs-on: ubuntu-latest
steps:
- name: Echo latest release tag from previous job
shell: bash -l {0}
run: |
echo "Latest release tag from previous job: ${{ needs.get-latest-release.outputs.latest_release_tag }}"