Skip to content

Commit

Permalink
Remove release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahweissman committed Oct 23, 2021
1 parent fcf49ed commit d2f28f3
Showing 1 changed file with 0 additions and 124 deletions.
124 changes: 0 additions & 124 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,40 +92,8 @@ jobs:
with:
command: clippy
args: '-- -D warnings'
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
lfs: true
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- id: get_previous_version
run: echo ::set-output name=PREVIOUS_VERSION::$(git describe --tags "$(git rev-list --tags --max-count=1)")
shell: bash
- id: semvers
uses: WyriHaximus/github-action-next-semvers@master
with:
version: '${{ steps.get_previous_version.outputs.PREVIOUS_VERSION }}'
- run: mkdir -p ./version
- if: "!contains(github.event.head_commit.message, 'BC BREAK') && !contains(github.event.head_commit.message, 'Signed-off-by: dependabot-preview[bot] <support@dependabot.com>')"
run: echo "$VERSION" >./version/version
env:
VERSION: ${{ steps.semvers.outputs.v_minor }}
- if: "contains(github.event.head_commit.message, 'Signed-off-by: dependabot-preview[bot] <support@dependabot.com>')"
run: echo "$VERSION" >./version/version
env:
VERSION: ${{ steps.semvers.outputs.v_patch }}
- run: echo "$VERSION" > ./version/version
env:
VERSION: ${{ steps.semvers.outputs.v_major }}
if: "contains(github.event.head_commit.message, 'BC BREAK')"
- uses: actions/upload-artifact@master
with:
name: version
path: ./version/version
build:
needs:
- version
- lints
- test
- check
Expand Down Expand Up @@ -153,12 +121,6 @@ jobs:
- id: get_repository_name
run: echo ::set-output name=REPOSITORY_NAME::$(toml get Cargo.toml package.name | xargs echo)
shell: bash
- uses: actions/download-artifact@master
with:
name: version
- id: get_version
run: 'echo ::set-output "name=VERSION::$(toml get Cargo.toml package.version | xargs echo)"'
shell: bash
- uses: actions/cache@v1
with:
path: ~/.cargo/registry
Expand All @@ -178,7 +140,6 @@ jobs:
override: true
- uses: actions-rs/cargo@v1
env:
VERSION: '${{ steps.get_version.outputs.VERSION }}'
REPOSITORY_NAME: '${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}'
with:
command: build
Expand All @@ -187,88 +148,3 @@ jobs:
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-${{ matrix.target }}
path: ./target/release/${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}${{ matrix.suffix }}
release:
if: github.ref == 'refs/heads/main'
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
lfs: true
- uses: actions-rs/cargo@v1
with:
command: install
args: 'toml-cli'
- id: get_repository_name
run: echo ::set-output name=REPOSITORY_NAME::$(toml get Cargo.toml package.name | xargs echo)
shell: bash
- uses: actions/download-artifact@master
with:
name: version
- id: get_version
run: 'echo ::set-output name=VERSION::$(cat ./version/version)'
shell: bash
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-linux-gnu
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-apple-darwin
- uses: actions/download-artifact@master
with:
name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-pc-windows-msvc
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: install
args: 'toml-cli'
- run: |
TEMP_FILE="$(mktemp)"
toml set Cargo.toml package.version "${VERSION:1}" > "$TEMP_FILE"
mv "$TEMP_FILE" Cargo.toml
shell: bash
env:
VERSION: '${{ steps.get_version.outputs.VERSION }}'
- uses: stefanzweifel/git-auto-commit-action@v4.1.3
with:
commit_message: Bump cargo version
branch: ${{ github.head_ref }}
file_pattern: Cargo.toml
- id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: '${{ secrets.COMMITTER_TOKEN }}'
with:
tag_name: '${{ steps.get_version.outputs.VERSION }}'
release_name: 'Release ${{ steps.get_version.outputs.VERSION }}'
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
upload_url: '${{ steps.create_release.outputs.upload_url }}'
asset_path: ./${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-linux-gnu/${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}
asset_name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-unknown-linux-gnu
asset_content_type: application/octet-stream
- uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
upload_url: '${{ steps.create_release.outputs.upload_url }}'
asset_path: ./${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-apple-darwin/${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}
asset_name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-apple-darwin
asset_content_type: application/octet-stream
- uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
upload_url: '${{ steps.create_release.outputs.upload_url }}'
asset_path: ./${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-pc-windows-msvc/${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}.exe
asset_name: ${{ steps.get_repository_name.outputs.REPOSITORY_NAME }}-x86_64-pc-windows-msvc.exe
asset_content_type: application/octet-stream

0 comments on commit d2f28f3

Please sign in to comment.