Skip to content

Release

Release #51

Workflow file for this run

name: Release
on:
workflow_dispatch:
permissions:
contents: write
env:
GH_USER: "bearer-bot"
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
if: startsWith(github.ref, 'refs/tags') != true
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: v
default_bump: patch
outputs:
ref: refs/tags/${{ steps.tag_version.outputs.new_tag || github.ref_name }}
tag_name: ${{ steps.tag_version.outputs.new_tag || github.ref_name }}
build:
needs: [tag]
name: build-rules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: mkdir release
- name: Archive Ruby
run: tar -czvf release/ruby.tar.gz --directory ./rules ruby
- name: Archive JavaScript
run: tar -czvf release/javascript.tar.gz --directory ./rules javascript
- name: Archive PHP
run: tar -czvf release/php.tar.gz --directory ./rules php
- name: Archive Java
run: tar -czvf release/java.tar.gz --directory ./rules java
- name: Archive Python
run: tar -czvf release/python.tar.gz --directory ./rules python
- name: Archive Go
run: tar -czvf release/go.tar.gz --directory ./rules go
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "release/*"
tag: ${{ needs.tag.outputs.tag_name }}
name: ${{ needs.tag.outputs.tag_name }}
generateReleaseNotes: true