Skip to content

Commit

Permalink
Merge pull request #24 from nawaz1991/23-feature-github-action-to-upl…
Browse files Browse the repository at this point in the history
…oad-assets

23 feature GitHub action to upload assets
  • Loading branch information
nawaz1991 authored Jun 16, 2024
2 parents 3750185 + ab4f9a3 commit 8d1892b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Create and Upload Release

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Create release archives
run: |
TAG=${GITHUB_REF#refs/tags/}
# Create tar.gz archive
git archive --format=tar.gz --prefix=cpp-oasvalidator-${TAG}/ -o cpp-oasvalidator-${TAG}.tar.gz ${TAG}
# Create zip archive
git archive --format=zip --prefix=cpp-oasvalidator-${TAG}/ -o cpp-oasvalidator-${TAG}.zip ${TAG}
# Include submodules
TEMP_DIR=$(mktemp -d)
git clone --recursive . $TEMP_DIR/cpp-oasvalidator-${TAG}
# Add submodule content to tar.gz archive
tar -czf cpp-oasvalidator-${TAG}-with-submodules.tar.gz -C $TEMP_DIR cpp-oasvalidator-${TAG}
mv cpp-oasvalidator-${TAG}-with-submodules.tar.gz cpp-oasvalidator-${TAG}.tar.gz
# Add submodule content to zip archive
(cd $TEMP_DIR && zip -r cpp-oasvalidator-${TAG}-with-submodules.zip cpp-oasvalidator-${TAG})
mv $TEMP_DIR/cpp-oasvalidator-${TAG}-with-submodules.zip cpp-oasvalidator-${TAG}.zip
# Clean up
rm -rf $TEMP_DIR
- name: Upload tar.gz to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cpp-oasvalidator-${TAG}.tar.gz
asset_name: cpp-oasvalidator-${TAG}.tar.gz
tag: ${{ github.ref }}
overwrite: true
body: "Release ${TAG}"

- name: Upload zip to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cpp-oasvalidator-${TAG}.zip
asset_name: cpp-oasvalidator-${TAG}.zip
tag: ${{ github.ref }}
overwrite: true
body: "Release ${TAG}"
2 changes: 1 addition & 1 deletion thirdparty/benchmark
Submodule benchmark updated 65 files
+0 −1 .clang-tidy
+4 −5 .github/install_bazel.sh
+6 −7 .github/workflows/pre-commit.yml
+5 −5 .github/workflows/test_bindings.yml
+40 −27 .github/workflows/wheels.yml
+1 −0 .gitignore
+3 −3 .pre-commit-config.yaml
+25 −1 BUILD.bazel
+23 −12 CMakeLists.txt
+1 −0 CONTRIBUTORS
+17 −6 MODULE.bazel
+4 −6 README.md
+10 −8 WORKSPACE
+11 −19 bazel/benchmark_deps.bzl
+0 −3 bindings/python/BUILD
+0 −29 bindings/python/build_defs.bzl
+3 −15 bindings/python/google_benchmark/BUILD
+1 −0 bindings/python/google_benchmark/__init__.py
+0 −59 bindings/python/nanobind.BUILD
+0 −10 bindings/python/python_headers.BUILD
+4 −26 cmake/GetGitVersion.cmake
+7 −0 cmake/benchmark_main.pc.in
+2 −4 docs/reducing_variance.md
+28 −2 docs/user_guide.md
+43 −6 include/benchmark/benchmark.h
+6 −6 pyproject.toml
+96 −62 setup.py
+10 −1 src/CMakeLists.txt
+33 −4 src/benchmark.cc
+3 −2 src/benchmark_register.cc
+2 −2 src/benchmark_register.h
+2 −1 src/benchmark_runner.cc
+3 −3 src/colorprint.cc
+17 −6 src/complexity.cc
+9 −5 src/console_reporter.cc
+23 −11 src/cycleclock.h
+1 −5 src/internal_macros.h
+7 −0 src/json_reporter.cc
+2 −1 src/perf_counters.cc
+4 −2 src/statistics.cc
+1 −1 src/string_util.cc
+33 −21 src/sysinfo.cc
+15 −4 src/timers.cc
+28 −1 src/timers.h
+2 −0 test/BUILD
+2 −8 test/CMakeLists.txt
+1 −1 test/basic_test.cc
+1 −1 test/benchmark_gtest.cc
+26 −0 test/benchmark_test.cc
+100 −58 test/complexity_test.cc
+2 −2 test/diagnostics_test.cc
+1 −1 test/link_main_test.cc
+1 −1 test/memory_manager_test.cc
+1 −1 test/perf_counters_gtest.cc
+1 −1 test/perf_counters_test.cc
+6 −3 test/reporter_output_test.cc
+1 −1 test/skip_with_error_test.cc
+4 −1 test/user_counters_tabular_test.cc
+7 −7 test/user_counters_test.cc
+1 −0 tools/BUILD.bazel
+1 −1 tools/compare.py
+18 −0 tools/gbench/Inputs/test5_run0.json
+18 −0 tools/gbench/Inputs/test5_run1.json
+95 −1 tools/gbench/report.py
+13 −6 tools/gbench/util.py

0 comments on commit 8d1892b

Please sign in to comment.