Skip to content

Commit

Permalink
ci: update GitHub actions (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytakahashi authored Aug 1, 2024
1 parent c4b7a6d commit 6082555
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 30 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Go CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:

Expand All @@ -16,17 +16,17 @@ jobs:
strategy:
matrix:
go:
- '1.15'
- '1.22'

steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get dependencies
run: go get -v -t -d ./...
Expand All @@ -38,7 +38,7 @@ jobs:
run: make

- name: Archive generated package
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: alfred-unixtime-converter
path: UnixtimeConverter.alfredworkflow
30 changes: 7 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,20 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Go environment
uses: actions/setup-go@v1
uses: actions/setup-go@v4
with:
go-version: 1.15
go-version: 1.22

- name: Create package
run: make

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
${{ github.ref }} release
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./UnixtimeConverter.alfredworkflow
asset_name: UnixtimeConverter.alfredworkflow
asset_content_type: application/zip
draft: true
generate_release_notes: true
files: UnixtimeConverter.alfredworkflow
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/ytakahashi/alfred-unixtime-converter

go 1.15
go 1.22.5

0 comments on commit 6082555

Please sign in to comment.