Skip to content

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

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

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

name: Experiment with Syntax
on:
pull_request:
jobs:
get-latest-release:
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@v7
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
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 }}"