Skip to content

Format with v fmt

Format with v fmt #55

name: generate release
on:
push:
branches:
- main
jobs:
build_and_test:
name: run
runs-on: ubuntu-latest
steps:
- name: setup v
uses: nocturlab/[email protected]
with:
v-version: latest
id: v
- name: set up git repository
uses: actions/checkout@v2
- name: test
run: v test .
- name: build
run: v .
- name: upload compiled vsh artifact
uses: actions/upload-artifact@v2
with:
name: vsh
path: ./vsh
create_release:
name: create release with assets
runs-on: ubuntu-latest
needs: build_and_test
steps:
- uses: actions/checkout@master
with:
fetch-depth: '0'
- name: bump version and push tag
id: bump
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.AP_GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
RELEASE_BRANCHES: release*
# DRY_RUN: true
- name: adjust permissions
run: |
sudo chown -R $USER:$(id -gn $USER) ./
- uses: actions/download-artifact@v2
with:
name: vsh
- name: display structure of downloaded files
run: ls -R
- name: prepare release artifact
run: |
zip --junk-paths ./vsh_${{ steps.bump.outputs.tag }}.zip ./vsh
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.AP_GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump.outputs.tag }}
release_name: ${{ steps.bump.outputs.tag }}
draft: true
prerelease: true
body_path: ./.github/CHANGELOG.md
- name: upload vsh
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.AP_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./vsh_${{ steps.bump.outputs.tag }}.zip
asset_name: vsh_${{ steps.bump.outputs.tag }}.zip
asset_content_type: application/zip