diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 49e6374..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: cimg/go:1.18 - - steps: - - checkout - - run: | - curl https://raw.githubusercontent.com/outofforest/build/main/build > /tmp/outofforest-build - chmod u+x /tmp/outofforest-build - /tmp/outofforest-build . dev/lint dev/test build -workflows: - version: 2 - pull-request: - jobs: - - build: - filters: - branches: - ignore: - - main diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..94fef8e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: ci + +on: + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + persist-credentials: false + - name: CI + run: | + go build -o ./bin/tmp-build ./build/cmd + ./bin/tmp-build dev/lint dev/test build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcbe108..a18a1f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,26 +15,25 @@ jobs: - uses: actions/checkout@v3 with: persist-credentials: false - - uses: actions/github-script@v6 - name: Extract tag name + - name: Extract tag name id: tag + uses: actions/github-script@v6 with: result-encoding: string script: return context.ref.replace(/refs\/tags\//, ''); - - run: | - curl https://raw.githubusercontent.com/outofforest/build/main/build > /tmp/outofforest-build - chmod u+x /tmp/outofforest-build - /tmp/outofforest-build . build - name: Build OSMan - - uses: outofforest/rpmbuild@main - name: Build RPM + - name: Build OSMan + run: | + go build -o ./bin/tmp-build ./build/cmd + ./bin/tmp-build build + - name: Build RPM id: rpm + uses: outofforest/rpmbuild@main with: spec_file: ./build/osman.spec version: ${{ steps.tag.outputs.result }} out_dir: ./release - - uses: svenstaro/upload-release-action@v2 - name: Upload RPM package to release + - name: Upload RPM package to release + uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref }}