mirror of
https://github.com/mtkennerly/dunamai-action.git
synced 2025-06-19 13:48:05 +00:00
47 lines
1 KiB
YAML
47 lines
1 KiB
YAML
on:
|
|
- push
|
|
- pull_request
|
|
|
|
name: Main
|
|
|
|
jobs:
|
|
example:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
# This is necessary so that we have the tags.
|
|
fetch-depth: 0
|
|
- uses: ./
|
|
with:
|
|
env-var: MY_VERSION
|
|
args: --style semver
|
|
- run: echo $MY_VERSION
|
|
|
|
complete:
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
- macos-latest
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: ./
|
|
id: dunamai
|
|
with:
|
|
install: '1.2.0'
|
|
env-var: MY_VERSION
|
|
command: dunamai from git
|
|
args: --style semver
|
|
- run: echo $MY_VERSION from environment variable
|
|
- run: echo ${{ steps.dunamai.outputs.version }} from outputs
|