Release #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: true # Include submodules | |
fetch-depth: 0 | |
- name: Create tar.gz archive | |
run: | | |
mkdir -p release | |
git archive --format=tar.gz --prefix=cpp-oasvalidator-${GITHUB_REF#refs/tags/}/ HEAD > release/cpp-oasvalidator-${GITHUB_REF#refs/tags/}.tar.gz | |
cd release | |
tar -xzf cpp-oasvalidator-${GITHUB_REF#refs/tags/}.tar.gz | |
git submodule foreach --recursive 'git archive --format=tar.gz --prefix=$path/ HEAD > ../$path.tar.gz' | |
for f in *.tar.gz; do tar -xzf "$f"; done | |
rm *.tar.gz | |
cd .. | |
tar -czf cpp-oasvalidator-${GITHUB_REF#refs/tags/}.tar.gz -C release . | |
- name: Create zip archive | |
run: | | |
mkdir -p release | |
git archive --format=zip --prefix=cpp-oasvalidator-${GITHUB_REF#refs/tags/}/ HEAD > release/cpp-oasvalidator-${GITHUB_REF#refs/tags/}.zip | |
cd release | |
unzip cpp-oasvalidator-${GITHUB_REF#refs/tags/}.zip | |
git submodule foreach --recursive 'git archive --format=zip --prefix=$path/ HEAD > ../$path.zip' | |
for f in *.zip; do unzip "$f"; done | |
rm *.zip | |
cd .. | |
zip -r cpp-oasvalidator-${GITHUB_REF#refs/tags/}.zip release | |
- name: Upload Release Assets | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-asset-tar | |
path: cpp-oasvalidator-${GITHUB_REF#refs/tags/}.tar.gz | |
- name: Upload Release Assets | |
uses: actions/upload-artifact@v2 | |
with: | |
name: release-asset-zip | |
path: cpp-oasvalidator-${GITHUB_REF#refs/tags/}.zip |