release #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "release" | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- tests | |
types: | |
- completed | |
branches: | |
- master | |
jobs: | |
state: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Set up environment | |
uses: ./.github/actions/setup | |
- name: Fetch State | |
id: state | |
run: bash ./scripts/versions.sh | |
outputs: | |
local_version: ${{ steps.state.outputs.local_version }} | |
version_changed: ${{ steps.state.outputs.version_changed }} | |
release: | |
runs-on: ubuntu-latest | |
needs: state | |
if: needs.state.outputs.version_changed != 'not_changed' | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: ${{ secrets.ARVOLEAR_RELEASER }} | |
tag_name: ${{ needs.state.outputs.local_version }} | |
name: Release v${{ needs.state.outputs.local_version }} | |
body: | | |
# Release notes v${{ needs.state.outputs.local_version }} 🎉 | |
## This is a ${{ needs.state.outputs.version_changed }} release | |
To be filled... | |
draft: false | |
prerelease: false | |
publish: | |
runs-on: ubuntu-latest | |
needs: state | |
if: needs.state.outputs.version_changed != 'not_changed' | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Publish to npm | |
run: | | |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_ACCESS_TOKEN }} | |
npm run publish-to-npm |