diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 63e9b4b..c29dbcf 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,7 +3,8 @@ name: Go on: [push] env: - GO_VERSION: '>=1.21.0' + GO_VERSION: '>=1.22.0' + GOEXPERIMENT: rangefunc jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 90f34a2..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Release - -on: [push] - -permissions: - contents: write - -env: - GO_VERSION: '>=1.21.0' - NAME: 'inflater' - -jobs: - - build: - - name: Build - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] - arch: [ amd64, arm64 ] - exclude: - - os: windows-latest - arch: arm64 - - steps: - - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Setup env - id: setup - shell: bash - run: | - if [[ ${GITHUB_REF} =~ ^refs/tags/v[0-9]+\.[0-9]+ ]] ; then - export VERSION=${GITHUB_REF_NAME} - else - export VERSION=SNAPSHOT - fi - echo "VERSION=${VERSION}" >> $GITHUB_ENV - case ${{ matrix.os }} in - ubuntu-*) - if [ "${{ matrix.arch }}" = "arm64" ] ; then - sudo apt-get update - sudo apt-get -y install gcc-12-aarch64-linux-gnu - echo "CC=aarch64-linux-gnu-gcc-12" >> $GITHUB_ENV - fi - export GOOS=linux - export PKGEXT=.tar.gz - ;; - macos-*) - export GOOS=darwin - export PKGEXT=.zip - ;; - windows-*) - choco install zip - export GOOS=windows - export PKGEXT=.zip - ;; - esac - export GOARCH=${{ matrix.arch }} - echo "GOOS=${GOOS}" >> $GITHUB_ENV - echo "GOARCH=${GOARCH}" >> $GITHUB_ENV - echo "CGO_ENABLED=1" >> $GITHUB_ENV - echo "PKGNAME=${NAME}_${VERSION}_${GOOS}_${GOARCH}" >> $GITHUB_ENV - echo "PKGEXT=${PKGEXT}" >> $GITHUB_ENV - - - name: Build - shell: bash - run: | - go build - - - name: Archive - shell: bash - run: | - rm -rf _build/${PKGNAME} - mkdir -p _build/${PKGNAME} - cp -p ${NAME} _build/${PKGNAME} - cp -p LICENSE _build/${PKGNAME} - cp -p README.md _build/${PKGNAME} - - case "${PKGEXT}" in - ".tar.gz") - tar cf _build/${PKGNAME}${PKGEXT} -C _build ${PKGNAME} - ;; - ".zip") - (cd _build && zip -r9q ${PKGNAME}${PKGEXT} ${PKGNAME}) - ;; - esac - ls -laFR _build - - - name: Artifact upload - uses: actions/upload-artifact@v4 - with: - name: ${{ env.GOOS }}_${{ env.GOARCH }} - path: _build/${{ env.PKGNAME }}${{ env.PKGEXT }} - - create-release: - name: Create release - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') - needs: - - build - steps: - - uses: actions/download-artifact@v4 - with: { name: darwin_amd64 } - - uses: actions/download-artifact@v4 - with: { name: darwin_arm64 } - - uses: actions/download-artifact@v4 - with: { name: linux_amd64 } - - uses: actions/download-artifact@v4 - with: { name: linux_arm64 } - - uses: actions/download-artifact@v4 - with: { name: windows_amd64 } - - run: ls -lafR - - name: Release - uses: softprops/action-gh-release@v2 - with: - draft: true - prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} - files: | - *.tar.gz - *.zip - fail_on_unmatched_files: true - generate_release_notes: true - append_body: true - -# based on: github.com/koron-go/_skeleton/.github/workflows/release.yml diff --git a/go.mod b/go.mod index 2099072..6b11b50 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/koron-go/inflater -go 1.21 +go 1.22.5