Changed how version is determined

This commit is contained in:
Alejandro Celaya 2021-12-11 12:18:55 +01:00
parent 5c114b584d
commit 295de5be8e

View File

@ -19,11 +19,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Determine version - from input
id: determine_version
run: echo "::set-output name=version::${{ github.event.inputs.version }}"
shell: bash
# - name: Determine version - from env
- name: Determine version
run: echo ${{ github.event.inputs.version }}
# - name: Determine version
# id: determine_version
# run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
# shell: bash
@ -36,13 +34,16 @@ jobs:
coverage: none
- run: composer install --no-interaction --prefer-dist
- run: composer swagger:inline
- run: mkdir ${{ steps.determine_version.outputs.version }}
- run: mv docs/swagger/swagger-inline.json ${{ steps.determine_version.outputs.version }}/oas.json
# - run: mkdir ${{ steps.determine_version.outputs.version }}
- run: mkdir ${{ github.event.inputs.version }}
# - run: mv docs/swagger/swagger-inline.json ${{ steps.determine_version.outputs.version }}/oas.json
- run: mv docs/swagger/swagger-inline.json${{ github.event.inputs.version }}/oas.json
- name: Publish spec
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
repository-name: 'shlinkio/shlink-open-api-specs'
branch: main
folder: ${{ steps.determine_version.outputs.version }}
# folder: ${{ steps.determine_version.outputs.version }}
folder: ${{ github.event.inputs.version }}
target-folder: specs
clean: false