Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Preaudit #465

Draft
wants to merge 20 commits into
base: init
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Management

on:
push:
branches:
- main
paths:
- 'CHANGELOG.md'

permissions:
contents: write
pull-requests: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version from CHANGELOG
id: changelog
run: |
VERSION=$(grep -m 1 "## \[.*\]" CHANGELOG.md | grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+")
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Create Release
if: steps.changelog.outputs.version != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.changelog.outputs.version }}
run: |
if ! git tag | grep -q "^v$VERSION$"; then
# Extract changelog content for this version
CHANGELOG_CONTENTS=$(awk "/## \[$VERSION\]/,/## \[/{ if (!/## \[$VERSION\]/ && !/## \[/) print }" CHANGELOG.md)

# Create and push tag
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git tag -a "v$VERSION" -m "Release version $VERSION"
git push origin "v$VERSION"

# Create GitHub release
gh release create "v$VERSION" \
--title "Release v$VERSION" \
--notes "$CHANGELOG_CONTENTS" \
--draft=false \
--prerelease=false
fi
51 changes: 51 additions & 0 deletions .github/workflows/tlin_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tlin-check

on:
pull_request:
branches:
- main

jobs:
tlin-check:
strategy:
fail-fast: false

runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: checkout tlin
uses: actions/checkout@v4
with:
repository: gnoverse/tlin
ref: main
path: ./tlin

- name: setup go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: changed files
id: changed_files
uses: tj-actions/changed-files@v45
with:
files: |
*.gno
**.gno

- name: install tlin
run: |
cd tlin
go install ./cmd/tlin

- name: tlin check
run: |
for file in ${{ steps.changed_files.outputs.all_changed_files }}; do
echo "checking ${file} ..."
tlin ${file}
done
Loading