Skip to content

Commit

Permalink
CI: Workflows without mise
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Jan 2, 2025
1 parent fd5d7dc commit fc60a02
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 55 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ jobs:
- name: Fetch Git tags
run: git fetch --force --tags

- uses: jdx/mise-action@v2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Test binary
run: |
goreleaser release --clean
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: 2.5.1 # datasource=github-releases depName=goreleaser/goreleaser
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
44 changes: 0 additions & 44 deletions .github/workflows/snapshot.yaml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test

on:
push:
branches:
- "**"
paths-ignore:
- .editorconfig
- .gitignore
- .markdownlint.yaml
- .trunk/**
- LICENSE
- README.md
pull_request:
branches:
- main
workflow_dispatch: {}

jobs:
build:
name: Test

permissions:
id-token: write
contents: write

runs-on: ubuntu-24.04

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

- name: Fetch Git tags
run: git fetch --force --tags

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

- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.8.5 # datasource=github-releases depName=hashicorp/terraform

- name: Set up OpenTofu
uses: opentofu/setup-opentofu@v1
with:
tofu_version: 1.7.2 # datasource=github-releases depName=opentofu/opentofu

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: 2.5.1 # datasource=github-releases depName=goreleaser/goreleaser
args: build --clean --snapshot --single-target --output tf

- name: Run tests
run: make test
1 change: 1 addition & 0 deletions .opentofu-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.7.2
6 changes: 3 additions & 3 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
{
"customType": "regex",
"extractVersionTemplate": "^(?<version>.*)$",
"fileMatch": ["^\\.go-version$"],
"fileMatch": ["^\\.opentofu-version$"],
"matchStrings": ["(?<currentValue>\\d+\\.\\d+\\.\\d+)"],
"depNameTemplate": "golang",
"datasourceTemplate": "golang-version",
"datasourceTemplate": "github-releases",
"depNameTemplate": "opentofu/opentofu",
"versioningTemplate": "semver"
},
{
Expand Down
1 change: 1 addition & 0 deletions .terraform-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.8.5
2 changes: 0 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
golang 1.22.4 # datasource=github-releases depName=golang/go
goreleaser 2.5.1 # datasource=github-releases depName=goreleaser/goreleaser
opentofu 1.7.2 # datasource=github-releases depName=opentofu/opentofu
terraform 1.8.5 # datasource=github-releases depName=hashicorp/terraform
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tf

[![GitHub](https://img.shields.io/github/v/release/dex4er/tf?display_name=tag&sort=semver)](https://github.com/dex4er/tf)
[![Snapshot](https://github.com/dex4er/tf/actions/workflows/snapshot.yaml/badge.svg?branch=main)](https://github.com/dex4er/tf/actions/workflows/snapshot.yaml)
[![Test](https://github.com/dex4er/tf/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/dex4er/tf/actions/workflows/test.yaml)
[![Release](https://github.com/dex4er/tf/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/dex4er/tf/actions/workflows/release.yaml)
[![Trunk Check](https://github.com/dex4er/tf/actions/workflows/trunk.yaml/badge.svg?branch=main)](https://github.com/dex4er/tf/actions/workflows/trunk.yaml)
[![OSV Scanner](https://github.com/dex4er/tf/actions/workflows/osv-scanner.yaml/badge.svg?branch=main)](https://github.com/dex4er/tf/actions/workflows/osv-scanner.yaml)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dex4er/tf

go 1.21
go 1.22.4

require (
github.com/awoodbeck/strftime v0.0.0-20180221155908-016cde65fcde
Expand Down

0 comments on commit fc60a02

Please sign in to comment.