Update serialization for mappings + cleanup #6
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: Generate and commit distribution files | |
on: | |
issue_comment: | |
types: [created, edited] | |
workflow_dispatch: | |
concurrency: | |
group: "dist" | |
cancel-in-progress: false | |
permissions: | |
contents: write | |
jobs: | |
generate_dist: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/generate_dist' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Checkout PR | |
run: gh pr checkout $ISSUE | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ISSUE: ${{ github.event.issue.html_url }} | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
- name: Install Cue | |
uses: cue-lang/[email protected] | |
with: | |
version: 'v0.7.0' | |
- name: Install bundler and gems | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
- name: Generate distribution files | |
run: make | |
- name: Commit distribution files | |
run: | | |
git config --local user.name "GitHub Action" | |
git config --local user.email "[email protected]" | |
git add dist | |
git commit -m "🤖 Update distribution files" || exit 0 # Exit gracefully if no changes | |
git push |