CICD: Clean-up old release strategy (#2773)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Jeffrey Cafferata 2024-01-07 15:41:49 +01:00 committed by GitHub
parent 742610c337
commit 38fa1762a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 199 deletions

View file

@ -201,99 +201,3 @@ jobs:
- uses: actions/upload-artifact@v3.1.3
with:
path: "/tmp/test-results"
# release:
# if: # GitHub does not currently support regular expressions inside if conditions
## (github.ref == 'refs/tags//v[0-9]+(\.[0-9]+)*(-.*)*/') && (github.ref != 'refs/heads//.*/')
# runs-on: ubuntu-latest
# container:
# image: golang:${{ env.gover }}
# needs:
# - build
# env:
# DOCKERHUB_ACCESS_TOKEN:
# DOCKERHUB_USERNAME:
# steps:
# - uses: actions/checkout@v4
## # 'setup_remote_docker' was not transformed because there is no suitable equivalent in GitHub Actions
# - uses: "./.github/actions/docker_check"
# with:
# docker-password: "${{ secrets.DOCKER_PASSWORD }}"
# docker-username: "${{ env.DOCKER_LOGIN }}"
# - name: restore_cache
# uses: actions/cache@v3.3.2
# with:
# key: linux-go-${{ hashFiles('go.sum') }}-${{ env.cache-key }}
# restore-keys: linux-go-${{ hashFiles('go.sum') }}-${{ env.cache-key }}
# - name: Install goreleaser
# run: go install github.com/goreleaser/goreleaser@latest
# - run: goreleaser release
# - uses: actions/upload-artifact@v3.1.3
# with:
# path: dist
# - uses: actions/upload-artifact@v3.1.3
# with:
# path: |-
# dist/*.rpm
# dist/*.deb
# upload:
# if: # GitHub does not currently support regular expressions inside if conditions
## (github.ref == 'refs/tags//v[0-9]+(\.[0-9]+)*(-.*)*/') && (github.ref != 'refs/heads//.*/')
# runs-on: ubuntu-latest
# container:
# image: python:3.10
# needs:
# - release
# env:
# CLOUDSMITH_API_KEY:
# CLOUDSMITH_USERNAME:
# DOCKER_LOGIN:
# DOCKER_PASSWORD:
# strategy:
# matrix:
# arch:
# - i386
# - x86_64
# - arm64
# format:
# distro:
# steps:
# - uses: actions/download-artifact@v3.0.1
# with:
# path: "."
## # This item has no matching transformer
## - cloudsmith_cloudsmith_ensure_api_key:
## # This item has no matching transformer
## - cloudsmith_cloudsmith_install_cli:
## # This item has no matching transformer
## - cloudsmith_cloudsmith_publish:
# upload_1:
# if: # GitHub does not currently support regular expressions inside if conditions
## (github.ref == 'refs/tags//v[0-9]+(\.[0-9]+)*(-.*)*/') && (github.ref != 'refs/heads//.*/')
# runs-on: ubuntu-latest
# container:
# image: python:3.10
# needs:
# - release
# env:
# CLOUDSMITH_API_KEY:
# CLOUDSMITH_USERNAME:
# DOCKER_LOGIN:
# DOCKER_PASSWORD:
# strategy:
# matrix:
# arch:
# - i386
# - amd64
# - arm64
# format:
# distro:
# steps:
# - uses: actions/download-artifact@v3.0.1
# with:
# path: "."
## # This item has no matching transformer
## - cloudsmith_cloudsmith_ensure_api_key:
## # This item has no matching transformer
## - cloudsmith_cloudsmith_install_cli:
## # This item has no matching transformer
## - cloudsmith_cloudsmith_publish:

View file

@ -1,103 +0,0 @@
on:
release:
types: [published]
name: release
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.21
- name: Build binaries
run: go run build/build.go
env:
CGO_ENABLED: 0
- name: Get release from tag
run: echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:11})
id: versioner
- name: Create target directory
run: mkdir -p usr/bin
- name: Copy Linux version to dnscontrol
run: cp dnscontrol-Linux usr/bin/dnscontrol
- name: Bundle RPM
uses: bpicode/github-action-fpm@master
with:
fpm_args: 'usr/'
fpm_opts: '-n dnscontrol -t rpm -s dir -v ${{ steps.versioner.outputs.RELEASE_VERSION }} --license "The MIT License (MIT)" --url "https://dnscontrol.org/" --description "DNSControl: Infrastructure as Code for DNS Zones"'
- name: Bundle DEB
uses: bpicode/github-action-fpm@master
with:
fpm_args: 'usr/'
fpm_opts: '-n dnscontrol -t deb -s dir -v ${{ steps.versioner.outputs.RELEASE_VERSION }} --license "The MIT License (MIT)" --url "https://dnscontrol.org/" --description "DNSControl: Infrastructure as Code for DNS Zones"'
- name: Upload dnscontrol-Darwin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./dnscontrol-Darwin
asset_name: dnscontrol-Darwin
asset_content_type: application/octet-stream
- name: Upload dnscontrol-Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./dnscontrol-Linux
asset_name: dnscontrol-Linux
asset_content_type: application/octet-stream
- name: Upload dnscontrol.exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./dnscontrol.exe
asset_name: dnscontrol.exe
asset_content_type: application/octet-stream
- name: Upload RPM
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: dnscontrol-${{ steps.versioner.outputs.RELEASE_VERSION }}-1.x86_64.rpm
asset_name: dnscontrol-${{ steps.versioner.outputs.RELEASE_VERSION }}-1.x86_64.rpm
asset_content_type: application/x-rpm
- name: Upload DEB
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: dnscontrol_${{ steps.versioner.outputs.RELEASE_VERSION }}_amd64.deb
asset_name: dnscontrol_${{ steps.versioner.outputs.RELEASE_VERSION }}_amd64.deb
asset_content_type: application/vnd.debian.binary-package