Skip to content

Commit

Permalink
Merge pull request #104 from taikoxyz/fix-release-tag
Browse files Browse the repository at this point in the history
fix-release-tag
  • Loading branch information
myronrotter authored Oct 11, 2024
2 parents 2c9c6fd + 6366d14 commit e9793d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@ on:
pull_request:
branches:
- main
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: '^1.16'
go-version-file: 'go.mod'

- name: Install dependencies
run: go mod download
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: '1.21.3' # Adjust to your Go version
go-version-file: 'go.mod'

- name: Install dependencies
run: go mod tidy

- name: Get the current tag
id: get_tag
run: |
TAG=$(git describe --tags --abbrev=0)
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Current tag: $TAG"
echo "::set-output name=tag::$TAG"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Bump version and create tag
id: bump_version
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# Get the current tag
TAG=$(git describe --tags --abbrev=0)
TAG=${{ steps.get_tag.outputs.tag }}
# Extract the version number components
IFS='.' read -r -a VERSION_PARTS <<< "${TAG#v}"
MAJOR=${VERSION_PARTS[0]}
Expand All @@ -48,7 +48,7 @@ jobs:
git tag $NEW_TAG
git push origin $NEW_TAG
echo "New tag: $NEW_TAG"
echo "::set-output name=new_tag::$NEW_TAG"
echo "new_tag=$NEW_TAG" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:
steps:
# Step 1: Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Step 2: Authenticate to Google Cloud
- id: 'auth'
name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v1'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}'

# Step 3: Set up Google Cloud SDK
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v1'
uses: 'google-github-actions/setup-gcloud@v2'

# Step 4: Sync Folder to GCS Bucket
- name: Sync Folder to GCS Bucket
Expand Down

0 comments on commit e9793d3

Please sign in to comment.