generated from pyiron/pyiron_module_template
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.14 KB
/
experiment-with-ci-syntax.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}"