From 14c7aa7bc8810a7739a11de191a4c0db08abbc77 Mon Sep 17 00:00:00 2001 From: Franz Date: Tue, 3 May 2022 16:02:04 +0200 Subject: [PATCH] new release workflow, added readme --- .github/workflows/release.yml | 26 +++++++++++++++----------- README.md | 15 +++++++++++++++ 2 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 097d08b..af9cd6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,17 +9,21 @@ on: # workflow tasks jobs: - generate: - name: Generate cross-platform builds + releases-matrix: + name: Release Go Binary runs-on: ubuntu-latest + strategy: + matrix: + goos: [ linux, darwin ] + goarch: [ amd64, arm64 ] steps: - - name: Checkout the repository - uses: actions/checkout@v2 - - name: Generate build files - uses: thatisuday/go-cross-build@v1 + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.28 with: - platforms: 'linux/amd64, darwin/amd64, darwin/arm64, linux/arm64' - package: 'csvexec' - name: 'csvexec' - compress: 'false' - dest: 'dist' \ No newline at end of file + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "https://dl.google.com/go/go1.18.1.linux-amd64.tar.gz" + project_path: "." + binary_name: "csvexec" + extra_files: LICENSE README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ea6a4f --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +## Csv Exec +This tool will parse a CSV file then, for every single line, it will create a shell script based on django template +syntax and execute the task in parallel. Failures will be logged. + +### Example +You can use the data in the example folder to test it out: +```bash +$ csvexec examples/echo/echo.csv examples/echo/echo.sh.j2 +Starting runner 05/03 04:00:38PM '22 +0200: + - Jobs: 8, total 1034 lines, stop at 1034 + - Csv: examples/echo/echo.csv + - Template: examples/echo/echo.sh.j2 + - Workdir: /tmp/csvexec + - Eta: 1m3s [+===>-------------------------] 7.4% [failed:10] [avg:66ms] +```