Skip to content

Commit

Permalink
Migrate CI
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelGirodon committed Oct 8, 2022
1 parent d73084c commit a0f5546
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 54 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
cache: true

- name: Test
run: go test -v -coverpkg ./... ./... | tee test.out

- name: Publish test and coverage metrics
uses: gaelgirodon/ci-badges-action@v1
with:
gist-id: fbde4d59b7dd3c4f2cc9c4fea3497ae1
token: ${{ secrets.GIST_TOKEN }}

- name: Build (Linux)
run: go build -ldflags="-s -w" -o "propencrypt" "cmd/propencrypt.go"
env: { GOARCH: amd64, GOOS: linux }

- name: Build (Windows)
run: go build -ldflags="-s -w" -o "propencrypt.exe" "cmd/propencrypt.go"
env: { GOARCH: amd64, GOOS: windows }

- name: Package (Linux)
run: |
archive=propencrypt_linux_amd64.tar.gz
tar zcvf "${archive}" propencrypt
sha256sum "${archive}" | cut -d' ' -f 1 > "${archive}.sha256"
- name: Package (Windows)
shell: pwsh
run: |
$archive = 'propencrypt_windows_amd64.zip'
Compress-Archive 'propencrypt.exe' -DestinationPath "$archive" -CompressionLevel 'Optimal'
$hash = (Get-FileHash -Algorithm 'SHA256' "$archive").Hash.ToLower()
Set-Content -Path "$archive.sha256" -Value "$hash`n" -Encoding 'ascii' -NoNewline
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: propencrypt
path: propencrypt_*_*.*
52 changes: 0 additions & 52 deletions .gitlab-ci.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

[![release](https://img.shields.io/github/v/release/GaelGirodon/propencrypt?style=flat-square)](https://github.com/GaelGirodon/propencrypt/releases/latest)
[![license](https://img.shields.io/github/license/GaelGirodon/propencrypt?color=blue&style=flat-square)](./LICENSE)
[![build](https://img.shields.io/gitlab/pipeline/GaelGirodon/propencrypt/master?style=flat-square)](https://gitlab.com/GaelGirodon/propencrypt/-/pipelines/latest)
[![coverage](https://img.shields.io/gitlab/coverage/GaelGirodon/propencrypt/master?style=flat-square)](https://gitlab.com/GaelGirodon/propencrypt/-/pipelines/latest)
[![build](https://img.shields.io/github/workflow/status/GaelGirodon/propencrypt/build?style=flat-square)](https://github.com/GaelGirodon/propencrypt/actions/workflows/build.yml)
[![tests](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fgist.githubusercontent.com%2FGaelGirodon%2Ffbde4d59b7dd3c4f2cc9c4fea3497ae1%2Fraw%2Fpropencrypt-go-tests.json)](https://github.com/GaelGirodon/propencrypt/actions/workflows/build.yml)
[![coverage](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fgist.githubusercontent.com%2FGaelGirodon%2Ffbde4d59b7dd3c4f2cc9c4fea3497ae1%2Fraw%2Fpropencrypt-go-coverage.json)](https://github.com/GaelGirodon/propencrypt/actions/workflows/build.yml)
[![docker](https://img.shields.io/docker/v/gaelgirodon/propencrypt?color=blue&label=docker&logo=docker&logoColor=white&style=flat-square)](https://hub.docker.com/r/gaelgirodon/propencrypt)

Encrypt and decrypt multiple properties, in multiple files, at once.
Expand Down

0 comments on commit a0f5546

Please sign in to comment.