Skip to content

Commit

Permalink
gitlab pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Weber committed Apr 6, 2023
1 parent cd5a690 commit 4469278
Showing 1 changed file with 39 additions and 40 deletions.
79 changes: 39 additions & 40 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ on:
workflow_dispatch:
inputs:
version:
description: 'version number'
description: "version number"
required: true

jobs:
scan:
name: scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: fmt
run: earthly +fmt --toolchain=nightly
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: fmt
run: earthly +fmt --toolchain=nightly
# - name: scan code
# run: |
# rustup component add clippy
Expand All @@ -26,61 +26,60 @@ jobs:
strategy:
matrix:
include:
- name: "default"
features: ""
- name: "default"
features: ""
steps:
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: test
run: earthly +test --toolchain=stable --features=${{ matrix.features }}
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: test
run: earthly +test --toolchain=stable --features=${{ matrix.features }}
build:
name: build (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "default"
features: ""
- name: "default"
features: ""
steps:
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: build
run: earthly +build --toolchain=stable --flags="--release --locked ${{ matrix.features }}"
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: build
run: earthly +build --toolchain=stable --flags="--release --locked ${{ matrix.features }}"

tag:
if: github.ref == 'refs/heads/master'
needs:
- scan
- test
- build
name: tag and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: |
Release ${{ github.event.inputs.version }}.
draft: false
prerelease: false
- uses: actions/checkout@v1
- name: create release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: |
Release ${{ github.event.inputs.version }}.
draft: false
prerelease: false

publish-cratesio:
needs:
- tag
name: crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: publish
run: |
earthly --secret token=${{ secrets.CRATES_IO_TOKEN }} +release --toolchain=stable --version=${{ github.event.inputs.version }}
- uses: actions/checkout@v1
- name: install earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: publish
run: |
earthly --secret token=${{ secrets.CRATES_IO_TOKEN }} +release --toolchain=stable --version=${{ github.event.inputs.version }}

0 comments on commit 4469278

Please sign in to comment.