adding workflow for generating SRS files #2
This file contains hidden or 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: Generate SRS Files | |
| on: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.25' | |
| - name: Build | |
| run: go build -v ./cmd/csv_to_srs | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: csv_to_srs | |
| path: ./csv_to_srs | |
| retention-days: 1 | |
| generate_srs: | |
| if: startsWith(github.head_ref, 'main') | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: csv_to_srs | |
| - name: Set execute permission on csv_to_srs | |
| run: chmod +x ./csv_to_srs | |
| - name: Generating SRS files | |
| run: ./csv_to_srs -input_dir ./csv -output_dir ./srs | |
| - name: Add, commit, and push | |
| uses: actions4git/[email protected] | |
| with: | |
| path: ./srs |