name: 'CI' on: push: tags: - '*' pull_request: jobs: build: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Install NPM run: | npm install - name: Run NPM run: | npm run all env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} test: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: # the below actions use the local state of the action. please replace `./` with `mikepenz/release-changelog-builder-action@{latest-release}` # Showcases how to use the action without a prior checkout # Won't support providing a configuration file, as no checkout was done - name: "Configuration without Checkout" id: without_checkout uses: mikepenz/release-changelog-builder-action@develop with: toTag: "v0.0.3" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Echo Configuration without Checkout Changelog env: CHANGELOG: ${{ steps.without_checkout.outputs.changelog }} run: echo "CHANGELOG" - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 # Showcase the most minimal configuration possible - name: "Minimal Configuration" id: minimal_release uses: ./ env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Echo Minimal Configuration Changelog env: CHANGELOG: ${{ steps.minimal_release.outputs.changelog }} run: echo "$CHANGELOG" # Showcases a more complex configuration, providing a configuration, and specifically referencing owner, repo, from and to tag - name: "Complex Configuration" id: complex_release uses: ./ with: configuration: "configs/configuration_complex.json" owner: "mikepenz" repo: "release-changelog-builder-action" fromTag: "v0.0.1" toTag: "v0.0.3" token: ${{ secrets.GITHUB_TOKEN }} - name: Echo Complex Configuration Changelog env: CHANGELOG: ${{ steps.complex_release.outputs.changelog }} run: echo "CHANGELOG" # Showcases the capability to generate the changelog for an external repository provided - name: "External Repo Configuration" id: external_changelog uses: ./ with: configuration: "configs/configuration_complex.json" owner: "mikepenz" repo: "MaterialDrawer" fromTag: "v8.1.0" toTag: "v8.1.6" token: ${{ secrets.PERSONAL_TOKEN }} - name: Echo External Repo Configuration Changelog env: CHANGELOG: ${{ steps.external_changelog.outputs.changelog }} run: echo "$CHANGELOG" release: if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: "Build Changelog" id: github_release uses: mikepenz/release-changelog-builder-action@main with: configuration: "configs/configuration_repo.json" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release uses: actions/create-release@v1 with: tag_name: ${{ github.ref }} release_name: ${{ github.ref }} body: ${{ steps.github_release.outputs.changelog }} prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-b') || contains(github.ref, '-a') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}